summaryrefslogtreecommitdiff
path: root/plugins/Msg_Export/src/utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Msg_Export/src/utils.cpp')
-rwxr-xr-xplugins/Msg_Export/src/utils.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp
index 27b12dd673..ddafc4b599 100755
--- a/plugins/Msg_Export/src/utils.cpp
+++ b/plugins/Msg_Export/src/utils.cpp
@@ -716,6 +716,10 @@ static bool ExportDBEventInfo(MCONTACT hContact, HANDLE hFile, wstring sFilePath
}
else {
const char *szProto = GetContactProto(hContact);
+ if (szProto == nullptr) {
+ Netlib_Logf(0, MODULENAME ": cannot write message for a contact %d without protocol", hContact);
+ return false;
+ }
if (g_bUseJson) {
JSONNode pRoot, pInfo, pHist(JSON_ARRAY);