From c95aea407b89ee5ad4f5f87971104d05a453f9da Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Tue, 10 Jan 2012 14:57:16 +0100 Subject: Fix a crash in QDialog. Call d->helperDone before deleting 'this'. Change-Id: I06224f4d3a868dccd505b1f1d3ed56af6f339ba3 Reviewed-by: Bradley T. Hughes --- src/widgets/dialogs/qdialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/widgets/dialogs/qdialog.cpp b/src/widgets/dialogs/qdialog.cpp index 501fd4d264..af11fc971d 100644 --- a/src/widgets/dialogs/qdialog.cpp +++ b/src/widgets/dialogs/qdialog.cpp @@ -520,10 +520,10 @@ int QDialog::exec() setAttribute(Qt::WA_ShowModal, wasShowModal); int res = result(); - if (deleteOnClose) - delete this; if (d->nativeDialogInUse) d->helperDone(static_cast(res), d->platformHelper()); + if (deleteOnClose) + delete this; return res; } -- cgit v1.2.3