Don't use gtk_widget_set_tooltip_text() with NULL tooltip text.
authorAndriy Grytsenko <andrej@rep.kiev.ua>
Sat, 27 Sep 2014 13:43:48 +0000 (16:43 +0300)
committerAndriy Grytsenko <andrej@rep.kiev.ua>
Mon, 29 Sep 2014 19:16:18 +0000 (22:16 +0300)
plugins/menu.c

index 4149f4c..ad7d6f7 100644 (file)
@@ -448,7 +448,9 @@ static GtkWidget* create_item(MenuCacheItem *item, menup *m)
         gtk_image_menu_item_set_image( GTK_IMAGE_MENU_ITEM(mi), img );
         if( menu_cache_item_get_type(item) == MENU_CACHE_TYPE_APP )
         {
-            gtk_widget_set_tooltip_text( mi, menu_cache_item_get_comment(item) );
+            const char *comment = menu_cache_item_get_comment(item);
+            if (comment != NULL)
+                gtk_widget_set_tooltip_text(mi, comment);
             g_signal_connect(mi, "activate", G_CALLBACK(on_menu_item), m);
         }
         g_signal_connect(mi, "map", G_CALLBACK(on_menu_item_map), m);