[gnome-panel] run-dialog: do null check before using tokens
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-panel] run-dialog: do null check before using tokens
- Date: Sat, 7 Mar 2020 19:29:14 +0000 (UTC)
commit 52aa942871ba24e8f0363fd35665c683eee72146
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Sat Mar 7 21:20:35 2020 +0200
run-dialog: do null check before using tokens
CID 1445702.
gnome-panel/panel-run-dialog.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gnome-panel/panel-run-dialog.c b/gnome-panel/panel-run-dialog.c
index 69ef55df1..d645d1f17 100644
--- a/gnome-panel/panel-run-dialog.c
+++ b/gnome-panel/panel-run-dialog.c
@@ -684,13 +684,13 @@ fuzzy_command_match (const char *cmd1,
/* same for the user command */
tokens = g_strsplit (cmd2, " ", -1);
- word2 = g_path_get_basename (tokens [0]);
if (!tokens || !tokens [0]) {
g_free (word1);
g_strfreev (tokens);
return FALSE;
}
+ word2 = g_path_get_basename (tokens [0]);
g_strfreev (tokens);
if (!strcmp (word1, word2)) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]