[nautilus/gnome-3-22] files-view: fix crash on enter in search
- From: Ernestas Kulik <ernestask src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/gnome-3-22] files-view: fix crash on enter in search
- Date: Sat, 15 Apr 2017 16:38:53 +0000 (UTC)
commit 58863092f5157c2b93e82b333c3cfeec1abd5569
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 721682f..de09dab 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -1147,6 +1147,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]