projects
/
gtk4.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b912e84
)
reftests: Don't crash if no node
author
Benjamin Otte
<otte@redhat.com>
Thu, 21 Oct 2021 01:06:56 +0000
(
03:06
+0200)
committer
Benjamin Otte
<otte@redhat.com>
Fri, 22 Oct 2021 15:51:40 +0000
(17:51 +0200)
If we have no node, don't crash when trying to save the node file.
Instead, write an empty file.
testsuite/reftests/gtk-reftest.c
patch
|
blob
|
history
diff --git
a/testsuite/reftests/gtk-reftest.c
b/testsuite/reftests/gtk-reftest.c
index 2bf3fcc5f852cb97192606c34ae101173076f1d0..b3f9774c73c91bfcd0be472caccbbdbdbbd62046 100644
(file)
--- a/
testsuite/reftests/gtk-reftest.c
+++ b/
testsuite/reftests/gtk-reftest.c
@@
-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),