]> www.fi.muni.cz Git - evince.git/commitdiff
Check pointer != NULL before using it. Fixes bug #416841.
authorCarlos Garcia Campos <carlosgc@gnome.org>
Mon, 19 Mar 2007 15:46:35 +0000 (15:46 +0000)
committerCarlos Garcia Campos <carlosgc@src.gnome.org>
Mon, 19 Mar 2007 15:46:35 +0000 (15:46 +0000)
2007-03-19  Carlos Garcia Campos  <carlosgc@gnome.org>
* shell/ev-view.c: (ev_view_primary_get_cb):
Check pointer != NULL before using it. Fixes bug #416841.

svn path=/trunk/; revision=2382

ChangeLog
shell/ev-view.c

index 1694e1b81e58db5baf3ee1b8a0bfddd8c61d2f61..3f5e678752e82f4a3b96cf2e31b80b1aacc38a97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-03-19  Carlos Garcia Campos  <carlosgc@gnome.org>
+
+       * shell/ev-view.c: (ev_view_primary_get_cb):
+
+       Check pointer != NULL before using it. Fixes bug #416841. 
+
 2007-03-12  Nickolay V. Shmyrev  <nshmyrev@yandex.ru>
 
        * NEWS:
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