I have this code in my Component:
// CommonDialog _commonDialog in .h file -- component to be shown in modal dialog;
_commonDialog.reset(new CommonDialog());
_commonDialog->setSize(400, 200);
_commonDialog->setDialogText(T::t("Are you sure you want to delete this instance?"));
//std::unique_ptr<DialogWindow::LaunchOptions> o in .h file;
o.reset(new DialogWindow::LaunchOptions());
o->useNativeTitleBar = true;
o->content.setOwned(_commonDialog.get());
//std::unique_ptr<DialogWindow> dialogWindow in .h file;
dialogWindow.reset(o->create());
dialogWindow->enterModalState();
It works fine.
But when I close my application, it crashes. I don’t understand why?
The debugger stack trace looks like this: