diff options
author | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-03-07 13:42:16 +0100 |
---|---|---|
committer | Rico Tzschichholz <ricotz@ubuntu.com> | 2021-03-07 13:42:16 +0100 |
commit | e4991e34c6f8075d6e3b53eb97a32340687f3072 (patch) | |
tree | 03548aab18dd7becff5651b40978bc6116851dd3 /tests/generics | |
parent | 99ba32dab8d0b05c47801bc95572f40e07e4afc3 (diff) | |
download | vala-e4991e34c6f8075d6e3b53eb97a32340687f3072.tar.gz |
vala: Add missing null-check in DataType.get_type_signature()
If an instance struct field can not be resolved to a valid
type-signature then bail.
This fixes criticals like:
g_string_insert_len: assertion 'len == 0 || val != NULL' failed
Diffstat (limited to 'tests/generics')
-rw-r--r-- | tests/generics/gvariant-serialization.test | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/generics/gvariant-serialization.test b/tests/generics/gvariant-serialization.test new file mode 100644 index 000000000..e9f9ad593 --- /dev/null +++ b/tests/generics/gvariant-serialization.test @@ -0,0 +1,10 @@ +Invalid Code + +struct Foo<G> { + public G g; +} + +void main () { + var foo = new Foo<string>[] {}; + Variant v = foo; +} |