QCocoaFileDialogHelper: protect more against dangling pointers
This is in addition to 10b5b4cbba,
where we made m_helper QPointer to make sure it was still valid
before accessing it. There is one more place in completionHandler
where we need the same check.
Fixes: QTBUG-131880
Pick-to: 6.5
Change-Id: Id51d2c68db23b897b145ad25dd1c73b3f5eb9cc1
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
(cherry picked from commit a794f957c4c17fbcb12a4b78f58240d109c150d5)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
bb10
parent
fad01d6a04
commit
497cc1deb8
|
|
@ -164,7 +164,10 @@ typedef QSharedPointer<QFileDialogOptions> SharedPointerFileDialogOptions;
|
|||
|
||||
[self updateProperties];
|
||||
|
||||
auto completionHandler = ^(NSInteger result) { m_helper->panelClosed(result); };
|
||||
auto completionHandler = ^(NSInteger result) {
|
||||
if (m_helper)
|
||||
m_helper->panelClosed(result);
|
||||
};
|
||||
|
||||
if (windowModality == Qt::WindowModal && parent) {
|
||||
NSView *view = reinterpret_cast<NSView*>(parent->winId());
|
||||
|
|
|
|||
Loading…
Reference in New Issue