small fixes

This commit is contained in:
Akash Mozumdar 2019-02-25 01:06:35 -05:00
parent f62f90a068
commit 4c1cac7dbb
2 changed files with 2 additions and 2 deletions

View File

@ -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);

View File

@ -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;