forked from AuroraMiddleware/gtk
Ensure that the path is always set
We are using `path` unconditionally, but it can be conditionally filled. To avoid inconsistent internal state, and a compiler warning, let's assert that the variable is always set.
This commit is contained in:
parent
66f7f1768f
commit
51db8f8f53
@ -615,7 +615,7 @@ static void
|
||||
file_text_serializer (GdkContentSerializer *serializer)
|
||||
{
|
||||
const GValue *value;
|
||||
char *path;
|
||||
char *path = NULL;
|
||||
|
||||
value = gdk_content_serializer_get_value (serializer);
|
||||
|
||||
@ -651,6 +651,8 @@ file_text_serializer (GdkContentSerializer *serializer)
|
||||
path = g_string_free (str, FALSE);
|
||||
}
|
||||
|
||||
g_assert (path != NULL);
|
||||
|
||||
g_output_stream_write_all_async (gdk_content_serializer_get_output_stream (serializer),
|
||||
path,
|
||||
strlen (path),
|
||||
|
Loading…
Reference in New Issue
Block a user