[gnome-shell/gnome-3-2] app: Fix crash on search
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/gnome-3-2] app: Fix crash on search
- Date: Wed, 18 Jan 2012 15:30:22 +0000 (UTC)
commit bf2ad9d4e84a168ba15996a5e508c07a57963a52
Author: Ray Strode <rstrode redhat com>
Date: Thu Nov 10 17:33:36 2011 -0500
app: Fix crash on search
Not all desktop files tracked by the shell have
Exec lines. This could be because they're actually
run by another process, for instance, and the desktop
file is merely there to provide metadata. For example,
nautilus-pastebin provides a desktop file without an
Exec line.
The shell currently crashes if one of these partial
desktop files is installed and the user attempts to
search from the overview.
commit 37726a4cb69ab54298a3c95ccf469e1ab87ed4b1 fixed
a similar crasher.
This commit fixes the next one lower in the code.
https://bugzilla.gnome.org/show_bug.cgi?id=663815
src/shell-app.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/shell-app.c b/src/shell-app.c
index b877f50..09ba262 100644
--- a/src/shell-app.c
+++ b/src/shell-app.c
@@ -1261,13 +1261,16 @@ _shell_app_match_search_terms (ShellApp *app,
current_match = MATCH_SUBSTRING;
}
- p = strstr (app->casefolded_exec, term);
- if (p != NULL)
+ if (app->casefolded_exec)
{
- if (p == app->casefolded_exec || *(p - 1) == '-')
- current_match = MATCH_PREFIX;
- else if (current_match < MATCH_PREFIX)
- current_match = MATCH_SUBSTRING;
+ p = strstr (app->casefolded_exec, term);
+ if (p != NULL)
+ {
+ if (p == app->casefolded_exec || *(p - 1) == '-')
+ current_match = MATCH_PREFIX;
+ else if (current_match < MATCH_PREFIX)
+ current_match = MATCH_SUBSTRING;
+ }
}
if (app->casefolded_description && current_match < MATCH_PREFIX)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]