Bug 682585 - Edit/Modules: pressing any key crashes gimp
Don't crash if module-dialog.c: dialog_select_callback() is called without any selected list item.
This commit is contained in:
@ -282,22 +282,25 @@ static void
|
||||
dialog_select_callback (GtkTreeSelection *sel,
|
||||
ModuleDialog *dialog)
|
||||
{
|
||||
GimpModule *module;
|
||||
GtkTreeIter iter;
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_tree_selection_get_selected (sel, NULL, &iter);
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (dialog->list), &iter,
|
||||
COLUMN_MODULE, &module, -1);
|
||||
if (gtk_tree_selection_get_selected (sel, NULL, &iter))
|
||||
{
|
||||
GimpModule *module;
|
||||
|
||||
if (module)
|
||||
g_object_unref (module);
|
||||
gtk_tree_model_get (GTK_TREE_MODEL (dialog->list), &iter,
|
||||
COLUMN_MODULE, &module, -1);
|
||||
|
||||
if (dialog->selected == module)
|
||||
return;
|
||||
if (module)
|
||||
g_object_unref (module);
|
||||
|
||||
dialog->selected = module;
|
||||
if (dialog->selected == module)
|
||||
return;
|
||||
|
||||
dialog_info_update (dialog->gimp->module_db, dialog->selected, dialog);
|
||||
dialog->selected = module;
|
||||
|
||||
dialog_info_update (dialog->gimp->module_db, dialog->selected, dialog);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in New Issue
Block a user