Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/libview
diff options
context:
space:
mode:
Diffstat (limited to 'libview')
-rw-r--r--libview/ev-view.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/libview/ev-view.c b/libview/ev-view.c
index 7ef1dd8..47fb438 100644
--- a/libview/ev-view.c
+++ b/libview/ev-view.c
@@ -5454,13 +5454,16 @@ selection_free (EvViewSelection *selection)
static void
clear_selection (EvView *view)
{
- g_list_foreach (view->selection_info.selections, (GFunc)selection_free, NULL);
- g_list_free (view->selection_info.selections);
- view->selection_info.selections = NULL;
+ if (view->selection_info.selections) {
+ g_list_foreach (view->selection_info.selections, (GFunc)selection_free, NULL);
+ g_list_free (view->selection_info.selections);
+ view->selection_info.selections = NULL;
+
+ g_signal_emit (view, signals[SIGNAL_SELECTION_CHANGED], 0, NULL);
+ }
view->selection_info.in_selection = FALSE;
if (view->pixbuf_cache)
ev_pixbuf_cache_set_selection_list (view->pixbuf_cache, NULL);
- g_signal_emit (view, signals[SIGNAL_SELECTION_CHANGED], 0, NULL);
}
void