gtk-demo: Plug a big memory leak

The colors demo was leaking all its colors. Oops.
This commit is contained in:
Matthias Clasen 2020-08-06 21:14:11 -04:00
parent 04c3c659f5
commit 14900efe38

View File

@ -226,7 +226,7 @@ gtk_color_set_property (GObject *object,
break; break;
case PROP_COLOR: case PROP_COLOR:
self->color = *(GdkRGBA *) g_value_dup_boxed (value); self->color = *(GdkRGBA *) g_value_get_boxed (value);
rgb_to_hsv (&self->color, &h, &s, &v); rgb_to_hsv (&self->color, &h, &s, &v);
self->h = round (360 * h); self->h = round (360 * h);
self->s = round (100 * s); self->s = round (100 * s);