[gnome-builder/wip/commands] commands: short-circuit if we failed to parse the name/parameters
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/commands] commands: short-circuit if we failed to parse the name/parameters
- Date: Tue, 7 Oct 2014 10:54:12 +0000 (UTC)
commit 609fca6ddfd1fd46a4cc95407cb171883aa6c108
Author: Christian Hergert <christian hergert me>
Date: Tue Oct 7 03:53:33 2014 -0700
commands: short-circuit if we failed to parse the name/parameters
src/commands/gb-command-manager.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/commands/gb-command-manager.c b/src/commands/gb-command-manager.c
index df6805b..21ad0a0 100644
--- a/src/commands/gb-command-manager.c
+++ b/src/commands/gb-command-manager.c
@@ -135,6 +135,9 @@ gb_command_manager_lookup (GbCommandManager *manager,
priv = manager->priv;
name = gb_command_manager_parse (manager, command_text, &variant);
+ if (!name)
+ return NULL;
+
command = g_hash_table_lookup (priv->commands, name);
if (command && parameters)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]