LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File gummi-fix-crash-on-opening-file.patch of Package gummi (Project Publishing)

Upstream bug: http://dev.midnightcoding.org/issues/498
diff --git a/src/gui/gui-tabmanager.c b/src/gui/gui-tabmanager.c
index 4056faf..c7b7c09 100644
--- a/src/gui/gui-tabmanager.c
+++ b/src/gui/gui-tabmanager.c
@@ -165,12 +165,13 @@
 
 gint tabmanagergui_replace_page(GuTabContext* tc, GuEditor* newec)
 {
+  GtkWidget *scrolled_view = GTK_WIDGET (g_active_editor->view);
 
   gummi->tabmanager->active_tab->editor = newec;
 
-  gtk_container_remove(GTK_CONTAINER(tc->page->scrollw),
-                       GTK_WIDGET(g_active_editor->view));
   editor_destroy(g_active_editor);
+  gtk_container_remove (GTK_CONTAINER (tc->page->scrollw),
+                        scrolled_view);
   gtk_container_add(GTK_CONTAINER(tc->page->scrollw),
                     GTK_WIDGET(newec->view));
   gtk_widget_show(GTK_WIDGET(newec->view));