mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gconvert: Add an assertion to help static analysis
`g_convert()` returns `NULL` iff it returns an error, but the static analyser can’t quite work that out. Add an assertion to help. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Coverity CID: #1486844
This commit is contained in:
parent
0c6a1af9d6
commit
b810bdc94d
@ -681,6 +681,8 @@ g_convert_with_fallback (const gchar *str,
|
||||
if (!local_error)
|
||||
return dest;
|
||||
|
||||
g_assert (dest == NULL);
|
||||
|
||||
if (!g_error_matches (local_error, G_CONVERT_ERROR, G_CONVERT_ERROR_ILLEGAL_SEQUENCE))
|
||||
{
|
||||
g_propagate_error (error, local_error);
|
||||
|
Loading…
Reference in New Issue
Block a user