summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@src.gnome.org>2016-11-13 22:26:10 +0200
committerErnestas Kulik <ernestask@src.gnome.org>2016-11-13 22:26:10 +0200
commitfbd7100875cac820bf8a089004bdf8da2c20eddb (patch)
tree5911a7bcec992fcceb0450f3d68c8e24435bf10e
parentae6f9ac8970d373a27682d1c4f1834e3621ab4e1 (diff)
downloadnautilus-fbd7100875cac820bf8a089004bdf8da2c20eddb.tar.gz
window: check for an active slot when updating cursor
When updating the cursor, the existence of an active window slot is assumed when checking if it allows stopping. This can cause a crash if the last view is closed while it is still loading. https://bugzilla.gnome.org/show_bug.cgi?id=773499
-rw-r--r--src/nautilus-window.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index f3166f244..4d59413fc 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -750,7 +750,8 @@ update_cursor (NautilusWindow *window)
slot = nautilus_window_get_active_slot (window);
- if (nautilus_window_slot_get_allow_stop (slot)) {
+ if (slot != NULL &&
+ nautilus_window_slot_get_allow_stop (slot)) {
GdkDisplay *display;
display = gtk_widget_get_display (GTK_WIDGET (window));