[gnome-builder/wip/chergert/debugger] mi2: check breakpoint_id before emitting signal



commit b08c7846866a959d9530a13512c70b8969d778a6
Author: Christian Hergert <chergert redhat com>
Date:   Sat Mar 25 19:42:23 2017 -0700

    mi2: check breakpoint_id before emitting signal

 contrib/mi2/mi2-client.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/contrib/mi2/mi2-client.c b/contrib/mi2/mi2-client.c
index 07a7227..d865e64 100644
--- a/contrib/mi2/mi2-client.c
+++ b/contrib/mi2/mi2-client.c
@@ -824,7 +824,8 @@ mi2_client_remove_breakpoint_cb (GObject      *object,
     }
 
   id = GPOINTER_TO_INT (g_task_get_task_data (task));
-  g_signal_emit (self, signals [BREAKPOINT_REMOVED], 0, id);
+  if (id != 0)
+    g_signal_emit (self, signals [BREAKPOINT_REMOVED], 0, id);
 
   g_task_return_boolean (task, TRUE);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]