From 471917726e646d28390d777902e5e846ef01ec7c Mon Sep 17 00:00:00 2001 From: Xusheng Date: Wed, 31 Jan 2024 13:10:20 +0800 Subject: [PATCH] Fix crashing when doing remote debugging. Fix https://github.com/Vector35/debugger/issues/534 --- ui/ui.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ui/ui.cpp b/ui/ui.cpp index 2479e9b..841663a 100644 --- a/ui/ui.cpp +++ b/ui/ui.cpp @@ -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( @@ -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( @@ -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(