diff options
Diffstat (limited to 'plugins/Msg_Export')
-rwxr-xr-x | plugins/Msg_Export/src/stdafx.h | 1 | ||||
-rwxr-xr-x | plugins/Msg_Export/src/utils.cpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/plugins/Msg_Export/src/stdafx.h b/plugins/Msg_Export/src/stdafx.h index 14147793e0..b2be179c48 100755 --- a/plugins/Msg_Export/src/stdafx.h +++ b/plugins/Msg_Export/src/stdafx.h @@ -33,6 +33,7 @@ using namespace std; #include <m_clist.h>
#include <m_contacts.h>
#include <m_langpack.h>
+#include <m_netlib.h>
#include <m_options.h>
#include <m_history.h>
#include <m_userinfo.h>
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);
|