[gnome-builder] beautifier plugin: check for editor view only



commit 4181ede636a0d87dcedafda7e6046dc8e44bf928
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Fri Aug 11 17:29:12 2017 +0200

    beautifier plugin: check for editor view only

 plugins/beautifier/gb-beautifier-editor-addin.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/plugins/beautifier/gb-beautifier-editor-addin.c b/plugins/beautifier/gb-beautifier-editor-addin.c
index 33f15f6..24d966b 100644
--- a/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -262,7 +262,9 @@ cleanup_view_cb (GtkWidget               *widget,
   gchar *default_action_name;
 
   g_assert (GB_IS_BEAUTIFIER_EDITOR_ADDIN (self));
-  g_assert (IDE_IS_EDITOR_VIEW (view));
+
+  if (!IDE_IS_EDITOR_VIEW (view))
+    return;
 
   app = GTK_APPLICATION (g_application_get_default ());
 
@@ -331,6 +333,9 @@ gb_beautifier_editor_addin_view_set (IdeEditorAddin *addin,
    * a new view, then we want to clean it up.
    */
 
+  if (!IDE_IS_EDITOR_VIEW (view))
+    return;
+
   if (self->current_view != NULL)
     {
       if (view == IDE_LAYOUT_VIEW (self->current_view))


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