]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
codegen: Avoid critical in get_basic_type_info() when there is no signature
authorRico Tzschichholz <ricotz@ubuntu.com>
Tue, 15 May 2018 06:17:43 +0000 (08:17 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Tue, 15 May 2018 06:17:43 +0000 (08:17 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=729517

codegen/valagvariantmodule.vala

index 7838ea3e9f6884ace36615bfff6685b3a8791c20..b6d36b6eb200c9ec893132de8d460a04d6418278 100644 (file)
@@ -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 ();