ItsDeltin / Overwatch-Script-To-Workshop

Converts scripts to Overwatch workshops.
208 stars 24 forks source link

delete() null reference exception #115

Closed TforTrevor closed 4 years ago

TforTrevor commented 4 years ago

Calling delete on a variable that does not exist causes the parser to throw a null reference exception.

An exception was thrown while parsing.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Deltin.Deltinteger.Parse.DeleteAction..ctor(ParseInfo parseInfo, Scope scope, DeleteContext deleteContext) in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Parse\Statement.cs:line 63
   at Deltin.Deltinteger.Parse.DeltinScript.GetStatement(ParseInfo parseInfo, Scope scope, StatementContext statementContext) in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Parse\Translate.cs:line 415
   at Deltin.Deltinteger.Parse.BlockAction..ctor(ParseInfo parseInfo, Scope scope, BlockContext blockContext) in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Parse\Block.cs:line 18
   at Deltin.Deltinteger.Parse.DefinedMethod.SetupBlock() in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Parse\Functions\DefinedMethod.cs:line 166
   at Deltin.Deltinteger.Parse.DeltinScript.Translate() in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Parse\Translate.cs:line 245
   at Deltin.Deltinteger.Parse.DeltinScript..ctor(TranslateSettings translateSettings) in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Parse\Translate.cs:line 56
   at Deltin.Deltinteger.LanguageServer.DocumentHandler.Update() in C:\Users\Deltin\Documents\GitHub\Overwatch-Script-To-Workshop\Deltinteger\Deltinteger\Language Server\DocumentHandler.cs:line 181
ItsDeltin commented 4 years ago

Fixed in v1.2.2.