[eog/wip/baedert/gtkimageview: 75/75] thumb-view: Don't use NULL model



commit 551c60ba005171bae470afa0e297038ac5c227a0
Author: Timm Bäder <mail baedert org>
Date:   Sat Mar 19 18:07:11 2016 +0100

    thumb-view: Don't use NULL model
    
    Can happen e.g. on DOWN presses if no image has been selected.

 src/eog-thumb-view.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c
index e528d4d..094cabe 100644
--- a/src/eog-thumb-view.c
+++ b/src/eog-thumb-view.c
@@ -958,6 +958,9 @@ eog_thumb_view_select_single (EogThumbView *thumbview,
 
        model = gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview));
 
+       if (model == NULL)
+               return;
+
        n_items = eog_list_store_length (EOG_LIST_STORE (model));
 
        if (n_items == 0) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]