Plug a small memory leak

This commit is contained in:
Matthias Clasen 2012-09-13 00:14:16 -04:00
parent 357db76c62
commit ba2e43111e

View File

@ -655,9 +655,15 @@ set_color_from_context (GtkStyle *style,
break;
}
if (!color || !(color->alpha > 0.01))
if (!color)
return FALSE;
if (!(color->alpha > 0.01))
{
gdk_rgba_free (color);
return FALSE;
}
dest->pixel = 0;
dest->red = CLAMP ((guint) (color->red * 65535), 0, 65535);
dest->green = CLAMP ((guint) (color->green * 65535), 0, 65535);