summaryrefslogtreecommitdiff
path: root/codegen
diff options
context:
space:
mode:
authorRico Tzschichholz <ricotz@ubuntu.com>2018-05-15 08:17:43 +0200
committerRico Tzschichholz <ricotz@ubuntu.com>2018-05-21 18:19:54 +0200
commit1760630f313320b3a0433fb24859ae3a9b6109c0 (patch)
tree47c87fa3d3a38d39a27746b953d083927180ac18 /codegen
parentd25e0c9ab094441fb672159f6da06c4a0f200551 (diff)
downloadvala-1760630f313320b3a0433fb24859ae3a9b6109c0.tar.gz
codegen: Avoid critical in get_basic_type_info() when there is no signature
https://bugzilla.gnome.org/show_bug.cgi?id=729517
Diffstat (limited to 'codegen')
-rw-r--r--codegen/valagvariantmodule.vala12
1 files changed, 7 insertions, 5 deletions
diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala
index 8d80e972b..3fa5ab507 100644
--- a/codegen/valagvariantmodule.vala
+++ b/codegen/valagvariantmodule.vala
@@ -61,11 +61,13 @@ public class Vala.GVariantModule : GAsyncModule {
return symbol.get_attribute_string ("DBus", "signature");
}
- bool get_basic_type_info (string signature, out BasicTypeInfo basic_type) {
- foreach (BasicTypeInfo info in basic_types) {
- if (info.signature == signature) {
- basic_type = info;
- return true;
+ bool get_basic_type_info (string? signature, out BasicTypeInfo basic_type) {
+ if (signature != null) {
+ foreach (BasicTypeInfo info in basic_types) {
+ if (info.signature == signature) {
+ basic_type = info;
+ return true;
+ }
}
}
basic_type = BasicTypeInfo ();