diff options
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/macab/MacabAddressBook.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx index a14b7abee9b9..02d4faf74290 100644 --- a/connectivity/source/drivers/macab/MacabAddressBook.cxx +++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx @@ -82,6 +82,13 @@ MacabAddressBook::MacabAddressBook( ) m_xMacabRecords(nullptr), m_bRetrievedGroups(false) { + if(m_aAddressBook == nullptr) + { + // TODO: tell the user to reset the permission via "tccutil reset AddressBook" + // or the system preferences and try again, this time granting the access + throw RuntimeException( + "failed to access the macOS address book - permission not granted?" ); + } } |