summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-25 08:55:35 +0200
committerMontel Laurent <[email protected]>2017-04-25 08:55:35 +0200
commit4348c7cd3c9f2a9034b6eee1996c5d0a5370448c (patch)
tree539a460c71dee3044b117b92c690a5f12770aac3
parent77aa90dec5456f41a808402b76bd072fbce1cab8 (diff)
Fix potential crash
-rw-r--r--src/libimportwizard/abstractaddressbook.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libimportwizard/abstractaddressbook.cpp b/src/libimportwizard/abstractaddressbook.cpp
index fe0682c..8e0ed82 100644
--- a/src/libimportwizard/abstractaddressbook.cpp
+++ b/src/libimportwizard/abstractaddressbook.cpp
@@ -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"));