summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-10-07 18:11:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-10-07 18:11:02 +0000
commit7a3df455bfcd141893090b7fb6c1d083808a612e (patch)
tree61c5ef5deaa5fa40a18cb760fe7bed9a7e951d76 /plugins
parent5af9c1bdac753b4ab1c0ddba60bacbc07e99f6ba (diff)
fix for adding events into disabled/unloaded contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@10730 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Import/src/import.cpp13
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++;
}