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



commit 426512a808d5965e8996fd664a9a66e0a4cec5fd
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 8bdf85bad..00cfca581 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]