diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 839c097..63da01e 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -212,6 +212,11 @@ void MainWindow::on_hookButton_clicked() void MainWindow::on_unhookButton_clicked() { QVector hooks = GetAllHooks(GetSelectedProcessId()); + if (hooks.size() == 0) + { + Host::AddConsoleOutput(L"no hooks detected"); + return; + } QStringList hookList; for (auto i : hooks) hookList.push_back( QString::fromStdWString(Host::GetHookName(GetSelectedProcessId(), i.address)) +