File gummi-fix-crash-on-opening-file.patch of Package gummi
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
@@ -145,12 +145,13 @@ gchar* tabmanagergui_get_labeltext (GuTabPage* tp) {
}
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));