From d798146de3861cee688bab1cca117bcf08c17fc2 Mon Sep 17 00:00:00 2001 From: Baldur Karlsson Date: Wed, 14 Mar 2018 15:27:20 +0000 Subject: [PATCH] Don't allow launching an application with no application selected! --- qrenderdoc/Windows/Dialogs/CaptureDialog.cpp | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp index bac8f341f..a8f4bcb31 100644 --- a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp @@ -1024,10 +1024,23 @@ void CaptureDialog::TriggerCapture() live->QueueCapture((int)ui->queuedFrame->value(), (int)ui->numFrames->value()); }); } + else + { + RDDialog::critical(this, tr("No process selected"), + tr("No process is selected to inject from the list above.")); + } } else { - QString exe = ui->exePath->text(); + QString exe = ui->exePath->text().trimmed(); + + if(exe.isEmpty()) + { + RDDialog::critical(this, tr("No executable selected"), + tr("No program selected to launch, click browse next to 'Executable Path' " + "above to select the program to launch.")); + return; + } // for non-remote captures, check the executable locally if(!m_Ctx.Replay().CurrentRemote())