Skip to content

Commit

Permalink
Fix crashing when doing remote debugging. Fix Vector35#534
Browse files Browse the repository at this point in the history
  • Loading branch information
xusheng6 committed Jan 31, 2024
1 parent c9c5d1c commit 4719177
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ui/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
auto prompt = QString("You are about to launch \n\n%1\n\non your machine. "
"This may harm your machine. Are you sure to continue?").
arg(QString::fromStdString(controller->GetExecutablePath()));
if (QMessageBox::question(ctxt.context->mainWindow(), "Launch Target", prompt) != QMessageBox::Yes)
if (QMessageBox::question(context->mainWindow(), "Launch Target", prompt) != QMessageBox::Yes)
return;
}

if (!ensureBinaryViewHasPlatform(controller->GetData(), ctxt.context->mainWindow()))
if (!ensureBinaryViewHasPlatform(controller->GetData(), context->mainWindow()))
return;

QString text = QString(
Expand Down Expand Up @@ -548,7 +548,7 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)

controller->SetPIDAttach(pid);

if (!ensureBinaryViewHasPlatform(controller->GetData(), ctxt.context->mainWindow()))
if (!ensureBinaryViewHasPlatform(controller->GetData(), context->mainWindow()))
return;

QString text = QString(
Expand Down Expand Up @@ -649,7 +649,7 @@ void GlobalDebuggerUI::SetupMenu(UIContext* context)
if (dialog->exec() != QDialog::Accepted)
return;

if (!ensureBinaryViewHasPlatform(controller->GetData(), ctxt.context->mainWindow()))
if (!ensureBinaryViewHasPlatform(controller->GetData(), context->mainWindow()))
return;

QString text = QString(
Expand Down

0 comments on commit 4719177

Please sign in to comment.