Commit 57bd1f44 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Fixed an error when closing several open wtt widgets.

parent 727efcae
...@@ -86,7 +86,7 @@ int main(int argc, char* argv[]) ...@@ -86,7 +86,7 @@ int main(int argc, char* argv[])
QApplication app(argc, argv); QApplication app(argc, argv);
QApplication::setStyle(new PwrStyle()); QApplication::setStyle(new PwrStyle());
WbQt(argc, argv); Wb::main_wb = new WbQt(argc, argv);
return app.exec(); return app.exec();
} }
......
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
#include <QWidget> #include <QWidget>
class WbQt : public Wb { class WbQt : public Wb {
public: public:
QWidget* toplevel; QWidget* toplevel;
QWidget* mainwindow; QWidget* mainwindow;
......
...@@ -497,6 +497,8 @@ int Wb::vsel_success(void* vselctx, pwr_tVolumeId* volumelist, int volume_count) ...@@ -497,6 +497,8 @@ int Wb::vsel_success(void* vselctx, pwr_tVolumeId* volumelist, int volume_count)
int sts; int sts;
pwr_tStatus status; pwr_tStatus status;
wb->appl_count--;
sts = 1; sts = 1;
if (CoLogin::privilege() & pwr_mPrv_DevRead) { if (CoLogin::privilege() & pwr_mPrv_DevRead) {
for (i = 0; i < volume_count; i++) { for (i = 0; i < volume_count; i++) {
......
...@@ -2320,6 +2320,8 @@ WttQt::~WttQt() ...@@ -2320,6 +2320,8 @@ WttQt::~WttQt()
options_form->close(); options_form->close();
} }
delete toplevel;
if (!close_cb) { if (!close_cb) {
debug_print("Shutting down...\n"); debug_print("Shutting down...\n");
exit(0); exit(0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment