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 37726a4cb6
fixed
a similar crasher.
This commit fixes the next one lower in the code.
https://bugzilla.gnome.org/show_bug.cgi?id=663815
This commit is contained in:
parent
463e0919d4
commit
46cea67258
@ -1262,6 +1262,8 @@ _shell_app_match_search_terms (ShellApp *app,
|
||||
current_match = MATCH_SUBSTRING;
|
||||
}
|
||||
|
||||
if (app->casefolded_exec)
|
||||
{
|
||||
p = strstr (app->casefolded_exec, term);
|
||||
if (p != NULL)
|
||||
{
|
||||
@ -1270,6 +1272,7 @@ _shell_app_match_search_terms (ShellApp *app,
|
||||
else if (current_match < MATCH_PREFIX)
|
||||
current_match = MATCH_SUBSTRING;
|
||||
}
|
||||
}
|
||||
|
||||
if (app->casefolded_description && current_match < MATCH_PREFIX)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user