mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
gdk_rgba_parse : do not segfault on null string
This commit is contained in:
parent
459bdbb143
commit
dce69904d8
@ -166,6 +166,9 @@ gdk_rgba_parse (GdkRGBA *rgba,
|
|||||||
gchar *str = (gchar *) spec;
|
gchar *str = (gchar *) spec;
|
||||||
gchar *p;
|
gchar *p;
|
||||||
|
|
||||||
|
g_return_val_if_fail (spec != NULL, FALSE);
|
||||||
|
|
||||||
|
|
||||||
if (strncmp (str, "rgba", 4) == 0)
|
if (strncmp (str, "rgba", 4) == 0)
|
||||||
{
|
{
|
||||||
has_alpha = TRUE;
|
has_alpha = TRUE;
|
||||||
|
Loading…
Reference in New Issue
Block a user