[vala/staging] codegen: Avoid critical in get_basic_type_info() when there is no signature
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/staging] codegen: Avoid critical in get_basic_type_info() when there is no signature
- Date: Wed, 16 May 2018 07:10:18 +0000 (UTC)
commit bc17dd4396c1118d0f3043e9430967f7ef9a301f
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Tue May 15 08:17:43 2018 +0200
codegen: Avoid critical in get_basic_type_info() when there is no signature
https://bugzilla.gnome.org/show_bug.cgi?id=729517
codegen/valagvariantmodule.vala | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/codegen/valagvariantmodule.vala b/codegen/valagvariantmodule.vala
index 7838ea3..b6d36b6 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 ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]