forked from AuroraMiddleware/gtk
colorchooserwidgeet: Reset the selected swatch when removing
Otherwise, priv->current points to garbage and subsequently leads to a crash, e.g. when adding another custom color.
This commit is contained in:
parent
dd322f715f
commit
16726e31f0
@ -747,6 +747,9 @@ add_custom_color (GtkColorChooserWidget *cc,
|
||||
if (g_list_length (children) >= 9)
|
||||
{
|
||||
last = g_list_last (children)->data;
|
||||
if (last == GTK_WIDGET (cc->priv->current))
|
||||
cc->priv->current = NULL;
|
||||
|
||||
gtk_widget_destroy (last);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user