diff --git a/src/shell-app.c b/src/shell-app.c index 3d1e78afa..54f81a0a9 100644 --- a/src/shell-app.c +++ b/src/shell-app.c @@ -1262,13 +1262,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)