]> www.fi.muni.cz Git - evince.git/blobdiff - shell/ev-view.c
Check pointer != NULL before using it. Fixes bug #416841.
[evince.git] / shell / ev-view.c
index 99f074119c7ee21a2851032c7d8b451448d223b0..a7641f84e18b5fea5eed6634ff5f7468234d9f77 100644 (file)
@@ -4743,8 +4743,10 @@ ev_view_primary_get_cb (GtkClipboard     *clipboard,
        }
 
        text = get_selected_text (ev_view);
-       gtk_selection_data_set_text (selection_data, text, -1);
-       g_free (text);
+       if (text) {
+               gtk_selection_data_set_text (selection_data, text, -1);
+               g_free (text);
+       }
 }
 
 static void