[gnome-builder] diagnostician: add assertion



commit 0ee08ad78ca0be6331157d8c0d6a6f410960416b
Author: Christian Hergert <chergert redhat com>
Date:   Sun Oct 23 20:08:13 2016 -0700

    diagnostician: add assertion

 libide/diagnostics/ide-diagnostician.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/libide/diagnostics/ide-diagnostician.c b/libide/diagnostics/ide-diagnostician.c
index ccd5b7f..b9a0a21 100644
--- a/libide/diagnostics/ide-diagnostician.c
+++ b/libide/diagnostics/ide-diagnostician.c
@@ -20,6 +20,7 @@
 
 #include <glib/gi18n.h>
 
+#include "ide-context.h"
 #include "ide-debug.h"
 #include "ide-internal.h"
 
@@ -208,6 +209,8 @@ ide_diagnostician_constructed (GObject *object)
 
   context = ide_object_get_context (IDE_OBJECT (object));
 
+  g_assert (IDE_IS_CONTEXT (context));
+
   self->extensions = ide_extension_set_adapter_new (context,
                                                     peas_engine_get_default (),
                                                     IDE_TYPE_DIAGNOSTIC_PROVIDER,


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