[vala] girparser: Add null check when setting the alias cname
- From: Luca Bruno <lucabru src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala] girparser: Add null check when setting the alias cname
- Date: Thu, 5 May 2011 16:58:45 +0000 (UTC)
commit 6f1e97ab2ed1cea153041ab4c18888927466e1fd
Author: Luca Bruno <lucabru src gnome org>
Date: Thu May 5 18:57:12 2011 +0200
girparser: Add null check when setting the alias cname
vala/valagirparser.vala | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index c0523cc..65b83c2 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -2699,7 +2699,10 @@ public class Vala.GirParser : CodeVisitor {
st.base_type = base_type;
}
st.external = true;
- st.set_cname (alias.girdata["c:type"]);
+ var cname = alias.girdata["c:type"];
+ if (cname != null) {
+ st.set_cname (cname);
+ }
if (simple_type) {
st.set_simple_type (true);
}
@@ -2711,7 +2714,10 @@ public class Vala.GirParser : CodeVisitor {
cl.add_base_type (base_type);
}
cl.external = true;
- cl.set_cname (alias.girdata["c:type"]);
+ var cname = alias.girdata["c:type"];
+ if (cname != null) {
+ cl.set_cname (cname);
+ }
alias.symbol = cl;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]