diff options
author | Felix Riemann <friemann@gnome.org> | 2021-04-30 16:13:01 +0000 |
---|---|---|
committer | Felix Riemann <friemann@gnome.org> | 2021-04-30 16:13:01 +0000 |
commit | e5004a9e41f6cb0a01e1819c547b9aba0a6e5f94 (patch) | |
tree | 62861607eb0332e0ad73af8051c1811f3c0b04b7 /src | |
parent | 33ffb9ff13f988023ebfa9757a8fa577dc604a9a (diff) | |
parent | 63969b8041b7d7bfcc0834ee5ee9b19c5337400b (diff) | |
download | eog-e5004a9e41f6cb0a01e1819c547b9aba0a6e5f94.tar.gz |
Merge branch 'fix-warnings-empty-view' into 'master'
Fix warnings when dragging or receiving inputs on empty view
See merge request GNOME/eog!99
Diffstat (limited to 'src')
-rw-r--r-- | src/eog-scroll-view.c | 6 | ||||
-rw-r--r-- | src/eog-thumb-view.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/eog-scroll-view.c b/src/eog-scroll-view.c index fcadcc38..a1dc6432 100644 --- a/src/eog-scroll-view.c +++ b/src/eog-scroll-view.c @@ -2730,6 +2730,9 @@ view_on_drag_begin_cb (GtkWidget *widget, view = EOG_SCROLL_VIEW (user_data); image = view->priv->image; + if (!image) + return; + thumbnail = eog_image_get_thumbnail (image); if (thumbnail) { @@ -2757,6 +2760,9 @@ view_on_drag_data_get_cb (GtkWidget *widget, image = view->priv->image; + if (!image) + return; + file = eog_image_get_file (image); uris[0] = g_file_get_uri (file); uris[1] = NULL; diff --git a/src/eog-thumb-view.c b/src/eog-thumb-view.c index f323feca..56e8acd9 100644 --- a/src/eog-thumb-view.c +++ b/src/eog-thumb-view.c @@ -967,6 +967,10 @@ eog_thumb_view_select_single (EogThumbView *thumbview, model = gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview)); + if (!model) { + return; + } + n_items = eog_list_store_length (EOG_LIST_STORE (model)); if (n_items == 0) { |