[vala/0.46] vala: Check before accessing "name" of parent_symbol which might be null



commit c81556c4a9e9741d0b5fb98c1cdbb0e025e03eaf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date:   Mon Dec 9 12:15:44 2019 +0100

    vala: Check before accessing "name" of parent_symbol which might be null

 vala/valadatatype.vala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/vala/valadatatype.vala b/vala/valadatatype.vala
index a17066fcd..cda1ba5e0 100644
--- a/vala/valadatatype.vala
+++ b/vala/valadatatype.vala
@@ -123,7 +123,7 @@ public abstract class Vala.DataType : CodeNode {
 
                if (data_type != null) {
                        Symbol global_symbol = data_type;
-                       while (global_symbol.parent_symbol.name != null) {
+                       while (global_symbol.parent_symbol != null && global_symbol.parent_symbol.name != 
null) {
                                global_symbol = global_symbol.parent_symbol;
                        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]