diff options
Diffstat (limited to 'plugins/Import/src/import.cpp')
-rw-r--r-- | plugins/Import/src/import.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 47b50029c3..43ca275ae6 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -705,12 +705,13 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC // calculate sub's handle for metahistory
MCONTACT hOwner = (bIsMeta) ? MapContact(srcDb->GetEventContact(hEvent)) : hDst;
-
- // add dbevent
- if (dstDb->AddEvent(hOwner, &dbei) != NULL)
- nMessagesCount++;
- else
- AddMessage(LPGENT("Failed to add message"));
+ if (hOwner != INVALID_CONTACT_ID) {
+ // add dbevent
+ if (dstDb->AddEvent(hOwner, &dbei) != NULL)
+ nMessagesCount++;
+ else
+ AddMessage(LPGENT("Failed to add message"));
+ }
}
else nDupes++;
}
|