shell: Avoid crash when searching if a .desktop has no comment
The code doing the search assumes the description column is set, which might not be the case. https://bugzilla.gnome.org/show_bug.cgi?id=661494
This commit is contained in:
parent
45a9b2cb1f
commit
80bd53ce10
1 changed files with 5 additions and 2 deletions
|
@ -154,12 +154,15 @@ shell_search_renderer_set_layout (ShellSearchRenderer *cell, GtkWidget *widget)
|
|||
needle = g_utf8_casefold (priv->search_string, -1);
|
||||
else
|
||||
needle = NULL;
|
||||
haystack = g_utf8_casefold (full_string, -1);
|
||||
if (full_string != NULL)
|
||||
haystack = g_utf8_casefold (full_string, -1);
|
||||
else
|
||||
haystack = NULL;
|
||||
|
||||
/* clear any previous attributes */
|
||||
pango_layout_set_attributes (priv->layout, NULL);
|
||||
|
||||
if (priv->search_string && priv->title
|
||||
if (priv->search_string && priv->search_target && priv->title
|
||||
&& (strstr (haystack, needle)))
|
||||
{
|
||||
gchar *start;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue