[gnome-builder/wip/chergert/layout] editor: fix precondition checks



commit 12db20966f0d812c41b8f9df176010f342ef6bf3
Author: Christian Hergert <chergert redhat com>
Date:   Thu Jul 6 16:10:29 2017 -0700

    editor: fix precondition checks

 libide/editor/ide-editor-properties.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/libide/editor/ide-editor-properties.c b/libide/editor/ide-editor-properties.c
index 70b6af0..b226666 100644
--- a/libide/editor/ide-editor-properties.c
+++ b/libide/editor/ide-editor-properties.c
@@ -124,7 +124,8 @@ void
 ide_editor_properties_set_view (IdeEditorProperties *self,
                                 IdeEditorView       *view)
 {
-  g_return_if_fail (IDE_IS_EDITOR_VIEW (self));
+  g_return_if_fail (IDE_IS_EDITOR_PROPERTIES (self));
+  g_return_if_fail (!view || IDE_IS_EDITOR_VIEW (view));
 
   dzl_gtk_widget_mux_action_groups (GTK_WIDGET (self),
                                     view ? GTK_WIDGET (view) : NULL,


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