forked from AuroraMiddleware/gtk
reftests: Don't crash if no node
If we have no node, don't crash when trying to save the node file. Instead, write an empty file.
This commit is contained in:
parent
b912e84df7
commit
438bf8596e
@ -311,7 +311,10 @@ save_node (GskRenderNode *node,
|
||||
}
|
||||
|
||||
g_test_message ("Storing test result node at %s", filename);
|
||||
bytes = gsk_render_node_serialize (node);
|
||||
if (node)
|
||||
bytes = gsk_render_node_serialize (node);
|
||||
else
|
||||
bytes = g_bytes_new ("", 0);
|
||||
ret = g_file_set_contents (filename,
|
||||
g_bytes_get_data (bytes, NULL),
|
||||
g_bytes_get_size (bytes),
|
||||
|
Loading…
Reference in New Issue
Block a user