Accept NULL in egg_regex_copy()
This commit is contained in:
parent
7f98703017
commit
591f001195
@ -353,11 +353,11 @@ egg_regex_copy (const EggRegex *regex)
|
|||||||
{
|
{
|
||||||
EggRegex *copy;
|
EggRegex *copy;
|
||||||
|
|
||||||
g_return_val_if_fail (regex != NULL, NULL);
|
if (regex == NULL)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
copy = g_new0 (EggRegex, 1);
|
copy = g_new0 (EggRegex, 1);
|
||||||
copy->pattern = regex_pattern_ref (regex->pattern);
|
copy->pattern = regex_pattern_ref (regex->pattern);
|
||||||
|
|
||||||
return copy;
|
return copy;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user