regex: Use critical messages if an unexpected NULL parameter is provided

As programmer error we should be consistent in using criticals.
This commit is contained in:
Marco Trevisan (Treviño) 2022-09-21 11:33:14 +02:00
parent 6caf952e48
commit 0f869ec5c6

View File

@ -483,7 +483,7 @@ translate_match_error (gint errcode)
break;
case PCRE2_ERROR_NULL:
/* NULL argument, this should not happen in GRegex */
g_warning ("A NULL argument was passed to PCRE");
g_critical ("A NULL argument was passed to PCRE");
break;
case PCRE2_ERROR_BADOPTION:
return "bad options";