Skip to content

Commit 420f6b6

Browse files
committed
Prevent NPE on Goto Declaration when completion mode FlashDevelop is chosen.
1 parent 291625d commit 420f6b6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

External/Plugins/HaXeContext/Context.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,7 @@ internal void OnFunctionCompletionResult(HaxeComplete hc, HaxeCompleteResult res
14041404

14051405
public override bool HandleGotoDeclaration(ScintillaControl sci, ASExpr expression)
14061406
{
1407-
if (GetCurrentSDKVersion().IsOlderThan(new SemVer("3.2.0")))
1407+
if (hxsettings.CompletionMode == HaxeCompletionModeEnum.FlashDevelop || GetCurrentSDKVersion().IsOlderThan(new SemVer("3.2.0")))
14081408
return false;
14091409

14101410
var hc = new HaxeComplete(sci, expression, false, completionModeHandler, HaxeCompilerService.POSITION);
@@ -1462,6 +1462,8 @@ public override string GetCompilerPath()
14621462
/// </summary>
14631463
public override void CheckSyntax()
14641464
{
1465+
if (hxsettings.CompletionMode == HaxeCompletionModeEnum.FlashDevelop || PluginBase.MainForm.CurrentDocument.IsUntitled) return;
1466+
14651467
EventManager.DispatchEvent(this, new NotifyEvent(EventType.ProcessStart));
14661468
var hc = new HaxeComplete(ASContext.CurSciControl, new ASExpr(), false, completionModeHandler, HaxeCompilerService.COMPLETION);
14671469
hc.GetList(OnCheckSyntaxResult);

0 commit comments

Comments
 (0)