QFileDialog: Protect against nullptr dereference
When the QFileDialog receives a language change event, and native dialogs are used, this code path dereference a nullptr in the qFileDialogUi member. Protect by checking the return value of QFileDialogPrivate::usingWidgets() as done in other places deferencing qFileDialogUi. Fixes a crash in GammaRay Change-Id: I3e9eb81c75d9fc983519a58c5ec06e316ac80263 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
9e888e633b
commit
e0c43fb046
@ -656,7 +656,7 @@ void QFileDialogPrivate::retranslateStrings()
|
||||
/* WIDGETS */
|
||||
if (options->useDefaultNameFilters())
|
||||
q->setNameFilter(QFileDialogOptions::defaultNameFilterString());
|
||||
if (nativeDialogInUse)
|
||||
if (!usingWidgets())
|
||||
return;
|
||||
|
||||
QList<QAction*> actions = qFileDialogUi->treeView->header()->actions();
|
||||
|
Loading…
Reference in New Issue
Block a user