[gnome-builder] editor: avoid operation on NULL editor surface



commit 0dbacc36a22bf7ad9c11415974fb0583f509ca5a
Author: Christian Hergert <chergert redhat com>
Date:   Mon Jan 14 11:42:32 2019 -0800

    editor: avoid operation on NULL editor surface

 src/plugins/editor/gbp-editor-workspace-addin.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/plugins/editor/gbp-editor-workspace-addin.c b/src/plugins/editor/gbp-editor-workspace-addin.c
index bbeaabdbf..b9c2d0edb 100644
--- a/src/plugins/editor/gbp-editor-workspace-addin.c
+++ b/src/plugins/editor/gbp-editor-workspace-addin.c
@@ -116,6 +116,9 @@ bind_buffer_manager (GbpEditorWorkspaceAddin *self,
   g_assert (IDE_IS_BUFFER_MANAGER (buffer_manager));
   g_assert (DZL_IS_SIGNAL_GROUP (signal_group));
 
+  if (self->surface == NULL)
+    return;
+
   n_items = g_list_model_get_n_items (G_LIST_MODEL (buffer_manager));
 
   for (guint i = 0; i < n_items; i++)


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