Commit 4348c7cd authored by Laurent Montel's avatar Laurent Montel 😁

Fix potential crash

parent 77aa90de
......@@ -43,7 +43,7 @@ bool AbstractAddressBook::selectAddressBook()
addAddressBookImportInfo(i18n("Creating new contact..."));
if (!mCollection.isValid()) {
const QStringList mimeTypes(KContacts::Addressee::mimeType());
QPointer<Akonadi::CollectionDialog> dlg = new Akonadi::CollectionDialog(mAbstractDisplayInfo->parentWidget());
QPointer<Akonadi::CollectionDialog> dlg = new Akonadi::CollectionDialog(mAbstractDisplayInfo ? mAbstractDisplayInfo->parentWidget() : nullptr);
dlg->setMimeTypeFilter(mimeTypes);
dlg->setAccessRightsFilter(Akonadi::Collection::CanCreateItem);
dlg->setWindowTitle(i18n("Select Address Book"));
......
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