From 572d3247c4fe2860be051549e82c680e021a7dea Mon Sep 17 00:00:00 2001 From: Carlos Garcia Campos Date: Mon, 19 Mar 2007 15:46:35 +0000 Subject: [PATCH] Check pointer != NULL before using it. Fixes bug #416841. 2007-03-19 Carlos Garcia Campos * shell/ev-view.c: (ev_view_primary_get_cb): Check pointer != NULL before using it. Fixes bug #416841. svn path=/trunk/; revision=2382 --- ChangeLog | 6 ++++++ shell/ev-view.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1694e1b8..3f5e6787 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-03-19 Carlos Garcia Campos + + * shell/ev-view.c: (ev_view_primary_get_cb): + + Check pointer != NULL before using it. Fixes bug #416841. + 2007-03-12 Nickolay V. Shmyrev * NEWS: diff --git a/shell/ev-view.c b/shell/ev-view.c index 99f07411..a7641f84 100644 --- a/shell/ev-view.c +++ b/shell/ev-view.c @@ -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 -- 2.43.5