Accept NULL in egg_regex_copy()

This commit is contained in:
Yevgen Muntyan 2006-12-15 21:12:49 -06:00
parent 7f98703017
commit 591f001195

View File

@ -353,11 +353,11 @@ egg_regex_copy (const EggRegex *regex)
{
EggRegex *copy;
g_return_val_if_fail (regex != NULL, NULL);
if (regex == NULL)
return NULL;
copy = g_new0 (EggRegex, 1);
copy->pattern = regex_pattern_ref (regex->pattern);
return copy;
}