From 4c1cac7dbbce5f83794432c4af79b5c1e8619123 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Mon, 25 Feb 2019 01:06:35 -0500 Subject: [PATCH] small fixes --- GUI/mainwindow.cpp | 2 +- extensions/lua.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;