[vala/0.40] vala: Handle unavailable type-symbol in Constant.check_const_type()
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.40] vala: Handle unavailable type-symbol in Constant.check_const_type()
- Date: Thu, 5 Mar 2020 18:45:48 +0000 (UTC)
commit d1ad68f5e6629e361941206b5d2e7e7f0273eb39
Author: Princeton Ferro <princetonferro gmail com>
Date: Thu Feb 20 15:31:13 2020 +0100
vala: Handle unavailable type-symbol in Constant.check_const_type()
This caused criticals like:
vala_typesymbol_is_subtype_of: assertion 'self != NULL' failed
vala/valaconstant.vala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/vala/valaconstant.vala b/vala/valaconstant.vala
index e96b047e0..34ee6e2c8 100644
--- a/vala/valaconstant.vala
+++ b/vala/valaconstant.vala
@@ -200,8 +200,8 @@ public class Vala.Constant : Symbol, Lockable {
} else if (type is ArrayType) {
var array_type = type as ArrayType;
return check_const_type (array_type.element_type, context);
- } else if (type.data_type.is_subtype_of (context.analyzer.string_type.data_type)) {
- return true;
+ } else if (type.data_type != null) {
+ return type.data_type.is_subtype_of (context.analyzer.string_type.data_type);
} else {
return false;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]