[gnome-builder] beautifier plugin: don't cast a maybe released view



commit f0ff3cd04d96e0972a40f0bb398711cb25e92692
Author: Sebastien Lafargue <slafargue gnome org>
Date:   Fri Aug 11 18:54:38 2017 +0200

    beautifier plugin: don't cast a maybe released view
    
    current_view maybe already been released
    (i have seen the case loading a file by using global search)
    
    Plus current_view doesn't need a cast, it's already a IdeLayoutView

 plugins/beautifier/gb-beautifier-editor-addin.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/plugins/beautifier/gb-beautifier-editor-addin.c b/plugins/beautifier/gb-beautifier-editor-addin.c
index 24d966b..bce49e0 100644
--- a/plugins/beautifier/gb-beautifier-editor-addin.c
+++ b/plugins/beautifier/gb-beautifier-editor-addin.c
@@ -338,7 +338,7 @@ gb_beautifier_editor_addin_view_set (IdeEditorAddin *addin,
 
   if (self->current_view != NULL)
     {
-      if (view == IDE_LAYOUT_VIEW (self->current_view))
+      if (view == self->current_view)
         return;
 
       if (view != NULL)


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