error handling

This commit is contained in:
Akash Mozumdar 2018-08-23 15:28:40 -04:00
parent 4310e97236
commit 65bb4b35cf

View File

@ -212,6 +212,11 @@ void MainWindow::on_hookButton_clicked()
void MainWindow::on_unhookButton_clicked() void MainWindow::on_unhookButton_clicked()
{ {
QVector<HookParam> hooks = GetAllHooks(GetSelectedProcessId()); QVector<HookParam> hooks = GetAllHooks(GetSelectedProcessId());
if (hooks.size() == 0)
{
Host::AddConsoleOutput(L"no hooks detected");
return;
}
QStringList hookList; QStringList hookList;
for (auto i : hooks) hookList.push_back( for (auto i : hooks) hookList.push_back(
QString::fromStdWString(Host::GetHookName(GetSelectedProcessId(), i.address)) + QString::fromStdWString(Host::GetHookName(GetSelectedProcessId(), i.address)) +