diff --git a/GUI/mainwindow.cpp b/GUI/mainwindow.cpp index 3ecb514..ff0e42d 100644 --- a/GUI/mainwindow.cpp +++ b/GUI/mainwindow.cpp @@ -31,7 +31,7 @@ MainWindow::MainWindow(QWidget *parent) : { EXTENSIONS, &MainWindow::Extensions } }) { - QPushButton* button = new QPushButton(ui->processFrame); + auto button = new QPushButton(ui->processFrame); connect(button, &QPushButton::clicked, this, slot); button->setText(text); ui->processLayout->addWidget(button); diff --git a/extensions/lua.cpp b/extensions/lua.cpp index 9b2f07b..ea2539e 100644 --- a/extensions/lua.cpp +++ b/extensions/lua.cpp @@ -87,7 +87,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved break; case DLL_PROCESS_DETACH: { - window->save(); + if (window) window->save(); if (lpReserved == NULL) // https://blogs.msdn.microsoft.com/oldnewthing/20120105-00/?p=8683 { delete window;