[nautilus] window: check for an active slot when updating cursor



commit 4b135947939f2d1a7530900be5af21127bdb11aa
Author: Ernestas Kulik <ernestask src gnome org>
Date:   Tue Oct 25 20:08:49 2016 +0300

    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

 src/nautilus-window.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
index be126f4..a9c1d87 100644
--- a/src/nautilus-window.c
+++ b/src/nautilus-window.c
@@ -796,7 +796,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;
 


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