File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed
Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -267,16 +267,24 @@ namespace GameHub.Data.Compat
267267 if (app_node != null && app_node is BinaryVDF . ListNode )
268268 {
269269 var app = (BinaryVDF . ListNode ) app_node;
270- var common = ( BinaryVDF . ListNode ) app. get_nested({" appinfo" , " common" });
270+ var common_node = app. get_nested({" appinfo" , " common" });
271271
272- if (common != null )
272+ if (common_node != null && common_node is BinaryVDF . ListNode )
273273 {
274- var name = ((BinaryVDF . StringNode ) common. get (" name" )). value ;
275- var type = ((BinaryVDF . StringNode ) common. get (" type" )). value ;
274+ var common = (BinaryVDF . ListNode ) common_node;
276275
277- if (type. down() == " tool" && name. down(). has_prefix(" proton " ))
276+ var name_node = common. get (" name" );
277+ var type_node = common. get (" type" );
278+
279+ if (name_node != null && name_node is BinaryVDF . StringNode && type_node != null && type_node is BinaryVDF . StringNode )
278280 {
279- versions. add(new Proton (app. key, name));
281+ var name = ((BinaryVDF . StringNode ) name_node). value ;
282+ var type = ((BinaryVDF . StringNode ) type_node). value ;
283+
284+ if (type != null && type. down() == " tool" && name != null && name. down(). has_prefix(" proton " ))
285+ {
286+ versions. add(new Proton (app. key, name));
287+ }
280288 }
281289 }
282290 }
You can’t perform that action at this time.
0 commit comments