mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-07-03 17:33:25 +00:00
widgets: Don't show palette name with no palette
Resolves #14047 The Color Dialog that appears when you select a text outline color does not load a palette from context. Since we then try to get the name from a NULL palette, this causes a crash. This patch resolves the issue by adding a check for the palette's existence before trying to get its name.
This commit is contained in:
parent
b25e489f6b
commit
1685c86af5
1 changed files with 8 additions and 5 deletions
|
@ -100,13 +100,16 @@ gimp_color_selector_palette_palette_changed (GimpContext *context,
|
||||||
GimpPalette *palette,
|
GimpPalette *palette,
|
||||||
GimpColorSelectorPalette *select)
|
GimpColorSelectorPalette *select)
|
||||||
{
|
{
|
||||||
gchar *palette_name;
|
|
||||||
|
|
||||||
gimp_view_set_viewable (GIMP_VIEW (select->view), GIMP_VIEWABLE (palette));
|
gimp_view_set_viewable (GIMP_VIEW (select->view), GIMP_VIEWABLE (palette));
|
||||||
|
|
||||||
g_object_get (palette, "name", &palette_name, NULL);
|
if (palette != NULL)
|
||||||
gtk_label_set_text (GTK_LABEL (select->name_label), palette_name);
|
{
|
||||||
g_free (palette_name);
|
gchar *palette_name;
|
||||||
|
|
||||||
|
g_object_get (palette, "name", &palette_name, NULL);
|
||||||
|
gtk_label_set_text (GTK_LABEL (select->name_label), palette_name);
|
||||||
|
g_free (palette_name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue