[gnome-builder] editor: ensure we have a tab before doing something with it.



commit d2e3ad62c9c1775e257dcd17ecb358c7fffc9103
Author: Christian Hergert <christian hergert me>
Date:   Fri Sep 12 14:48:24 2014 -0700

    editor: ensure we have a tab before doing something with it.

 src/editor/gb-editor-commands.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/editor/gb-editor-commands.c b/src/editor/gb-editor-commands.c
index 8684b2a..27fa6a1 100644
--- a/src/editor/gb-editor-commands.c
+++ b/src/editor/gb-editor-commands.c
@@ -591,7 +591,7 @@ gb_editor_commands_open (GbEditorWorkspace *workspace,
         {
           GFile *file = iter->data;
 
-          if (!gb_editor_tab_get_is_default (GB_EDITOR_TAB (active_tab)))
+          if (!tab || !gb_editor_tab_get_is_default (GB_EDITOR_TAB (active_tab)))
             {
               tab = GB_EDITOR_TAB (gb_editor_tab_new ());
               gb_notebook_add_tab (notebook, GB_TAB (tab));


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