mirror of https://github.com/GNOME/gimp.git
libgimpwidgets: Prevent FileChooser widget from crashing
We dereference "file" twice in gimp_prop_file_chooser_button_callback(), once in the GIMP_IS_PARAM_SPEC_CONFIG_PATH () condition and then at the end of the function. This is likely due to a similar structure in 2.10, which did not have a second condition. As a result, any Gegl filter which had a file property would crash if set from a GUI. The first g_object_unref() is removed so we only dereference "file" once.
This commit is contained in:
parent
134c354a9e
commit
0e3f34206a
|
@ -2894,7 +2894,7 @@ gimp_prop_file_chooser_button_setup (GtkWidget *button,
|
|||
G_CALLBACK (gimp_prop_file_chooser_button_notify),
|
||||
button);
|
||||
|
||||
gtk_widget_show (button);
|
||||
gtk_widget_set_visible (button, TRUE);
|
||||
|
||||
return button;
|
||||
}
|
||||
|
@ -2920,7 +2920,6 @@ gimp_prop_file_chooser_button_callback (GtkFileChooser *button,
|
|||
if (file)
|
||||
{
|
||||
value = gimp_file_get_config_path (file, NULL);
|
||||
g_object_unref (file);
|
||||
}
|
||||
|
||||
g_object_get (config, param_spec->name, &v, NULL);
|
||||
|
|
Loading…
Reference in New Issue