Kaydet (Commit) 03e5bb9f authored tarafından Colomban Wendling's avatar Colomban Wendling Kaydeden (comit) Matthew Brush

Fix crash if plugin manager is opened more than once (#1564)

Do not allow more than one plugin manager dialog at a time.  It doesn't
make sense and the code is not fully re-entrant and leads to a crash
toggling plugins in both dialogs.

Fixes #1563.
üst 18d52452
...@@ -1902,6 +1902,7 @@ static void pm_dialog_response(GtkDialog *dialog, gint response, gpointer user_d ...@@ -1902,6 +1902,7 @@ static void pm_dialog_response(GtkDialog *dialog, gint response, gpointer user_d
plugin_list = NULL; plugin_list = NULL;
} }
gtk_widget_destroy(GTK_WIDGET(dialog)); gtk_widget_destroy(GTK_WIDGET(dialog));
pm_widgets.dialog = NULL;
configuration_save(); configuration_save();
break; break;
...@@ -1919,6 +1920,12 @@ static void pm_show_dialog(GtkMenuItem *menuitem, gpointer user_data) ...@@ -1919,6 +1920,12 @@ static void pm_show_dialog(GtkMenuItem *menuitem, gpointer user_data)
{ {
GtkWidget *vbox, *vbox2, *swin, *label, *menu_item, *filter_entry; GtkWidget *vbox, *vbox2, *swin, *label, *menu_item, *filter_entry;
if (pm_widgets.dialog != NULL)
{
gtk_window_present(GTK_WINDOW(pm_widgets.dialog));
return;
}
/* before showing the dialog, we need to create the list of available plugins */ /* before showing the dialog, we need to create the list of available plugins */
load_all_plugins(); load_all_plugins();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment