[nautilus] files-view: fix crash on enter in search



commit 82a2d53e98758623cc2ebca176391d2d1f639e91
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date:   Fri Jan 13 23:32:20 2017 +0200

    files-view: fix crash on enter in search
    
    Pressing enter with no selection while in search makes Nautilus
    crash.
    
    The problem is that Nautilus will try to access the first element
    of a list that is NULL.
    
    To avoid this, make sure that the list is not NULL.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=777214

 src/nautilus-files-view.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 8498cb3..6bcdb0d 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1136,6 +1136,11 @@ nautilus_files_view_activate_files (NautilusFilesView       *view,
     GList *files_to_activate;
     char *path;
 
+    if (files == NULL)
+    {
+        return;
+    }
+
     files_to_extract = nautilus_file_list_filter (files,
                                                   &files_to_activate,
                                                   (NautilusFileFilterFunc) nautilus_mime_file_extracts,


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