1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-17 23:56:05 +02:00

Fixed some safe mode crashes

This commit is contained in:
Brian Fiete 2022-01-08 07:42:53 -05:00
parent 7af34fd81c
commit 59ba0dd0d4
2 changed files with 12 additions and 3 deletions

View file

@ -747,7 +747,16 @@ namespace IDE.ui
{ {
isWorking = true; isWorking = true;
var bfCompiler = gApp.mBfResolveCompiler; var bfCompiler = gApp.mBfResolveCompiler;
if (!bfCompiler.IsPerformingBackgroundOperation()) if (bfCompiler == null)
{
if (mOutputPanel == null)
{
ShowError("Cannot generate files in safe mode");
RehupMinSize();
}
mPendingGenList = false;
}
else if (!bfCompiler.IsPerformingBackgroundOperation())
{ {
bfCompiler.CheckThreadDone(); bfCompiler.CheckThreadDone();
@ -768,7 +777,7 @@ namespace IDE.ui
} }
} }
gApp.mBfResolveCompiler.CheckThreadDone(); gApp.mBfResolveCompiler?.CheckThreadDone();
if ((mThreadState == .Executing) || (isWorking)) if ((mThreadState == .Executing) || (isWorking))
{ {

View file

@ -1414,7 +1414,7 @@ namespace IDE.ui
{ {
bfCompiler.QueueProjectSourceRemoved(projectSource); bfCompiler.QueueProjectSourceRemoved(projectSource);
} }
gApp.mBfResolveCompiler.QueueDeferredResolveAll(); gApp.mBfResolveCompiler?.QueueDeferredResolveAll();
} }
#if IDE_C_SUPPORT #if IDE_C_SUPPORT
else if (IDEApp.IsClangSourceFile(fullPath)) else if (IDEApp.IsClangSourceFile(fullPath))