summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/utilities.cpp b/utilities.cpp
index e73d920..d3938a6 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -400,9 +400,9 @@ void CleanProtocolTmpThread(std::string proto)
std::list<HANDLE>::iterator end = contacts.end();
for(std::list<HANDLE>::iterator i = contacts.begin(); i != end; ++i)
{
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
}
clean_mutex.unlock();
}
@@ -428,9 +428,9 @@ void CleanProtocolExclThread(std::string proto)
std::list<HANDLE>::iterator end = contacts.end();
for(std::list<HANDLE>::iterator i = contacts.begin(); i != end; ++i)
{
- CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
+ CallService(MS_DB_CONTACT_DELETE, (WPARAM)*i, 0);
}
clean_mutex.unlock();
}
@@ -472,6 +472,8 @@ void HistoryLogFunc(HANDLE hContact, std::string message)
{
if(gbHistoryLog)
{
+ if(hContact == INVALID_HANDLE_VALUE)
+ return;
std::string msg = message;
msg.append("\n");
msg.append("Protocol: ").append((char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0)).append(" Contact:");