From 837b2f8c8d4ed330bb01d87f823571eb7e89024a Mon Sep 17 00:00:00 2001 From: arookas Date: Mon, 1 Feb 2016 01:32:09 -0500 Subject: [PATCH] Added null-check to GetId Not the best fallback return value, but meh. --- ssc/parser.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ssc/parser.cs b/ssc/parser.cs index c997836..318254d 100644 --- a/ssc/parser.cs +++ b/ssc/parser.cs @@ -257,6 +257,9 @@ namespace arookas { return null; } static __sunConstants GetId(Node node) { + if (node == null) { + return (__sunConstants)(-1); + } return (__sunConstants)node.Id; }