X-Git-Url: http://pileus.org/git/?p=aweather;a=blobdiff_plain;f=src%2Fplugins%2Falert.c;fp=src%2Fplugins%2Falert.c;h=4d4a556e0695511b07acdb9a9161e361be51b9d7;hp=4bd68d320dee9638a4538f7c05ad867066fe358e;hb=855463f97cf7fbf4e59276559753b41801c67cc5;hpb=bdae122854ed2d93abf51d7ef4acfd72cd77f209
diff --git a/src/plugins/alert.c b/src/plugins/alert.c
index 4bd68d3..4d4a556 100644
--- a/src/plugins/alert.c
+++ b/src/plugins/alert.c
@@ -449,8 +449,8 @@ static GtkWidget *_make_msg_details(AlertMsg *msg)
{
GtkWidget *title = gtk_label_new("");
- gchar *title_str = g_markup_printf_escaped(
- "%s", msg->title);
+ gchar *title_str = g_markup_printf_escaped("%s",
+ msg->title ?: "No title provided");
gtk_label_set_use_markup(GTK_LABEL(title), TRUE);
gtk_label_set_markup(GTK_LABEL(title), title_str);
gtk_label_set_line_wrap(GTK_LABEL(title), TRUE);
@@ -461,8 +461,9 @@ static GtkWidget *_make_msg_details(AlertMsg *msg)
GtkWidget *alert = gtk_scrolled_window_new(NULL, NULL);
GtkWidget *alert_view = gtk_text_view_new();
GtkTextBuffer *alert_buf = gtk_text_buffer_new(NULL);
- gchar *alert_str = g_markup_printf_escaped(
- "%s\n\n%s", msg->description, msg->instruction);
+ gchar *alert_str = g_markup_printf_escaped("%s\n\n%s",
+ msg->description ?: "No description provided",
+ msg->instruction ?: "No instructions provided");
PangoFontDescription *alert_font = pango_font_description_from_string(
"monospace");
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(alert),