]> spindle.queued.net Git - midori/commitdiff
sokoke_widget_copy_clipboard must be NULL-safe
authorChristian Dywan <christian@twotoasts.de>
Wed, 26 Oct 2011 17:51:05 +0000 (19:51 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 26 Oct 2011 18:07:11 +0000 (20:07 +0200)
midori/sokoke.c

index d3daab015f9d09ed0cf1b1885a282d5fed212d83..f77011a5a3ae1d6dff011dc655c3940c60fcff42 100644 (file)
@@ -1879,9 +1879,9 @@ sokoke_widget_copy_clipboard (GtkWidget*   widget,
     GtkClipboard* clipboard;
 
     clipboard = gtk_clipboard_get_for_display (display, GDK_SELECTION_CLIPBOARD);
-    gtk_clipboard_set_text (clipboard, text, -1);
+    gtk_clipboard_set_text (clipboard, text ? text : "", -1);
     clipboard = gtk_clipboard_get_for_display (display, GDK_SELECTION_PRIMARY);
-    gtk_clipboard_set_text (clipboard, text, -1);
+    gtk_clipboard_set_text (clipboard, text ? text : "", -1);
 }
 
 gchar*