summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-31 20:09:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-31 20:09:27 +0000
commit34f4b1928ea5ae86b7ead92d8dc2c53842499f31 (patch)
tree68344e36b6b8fb63ca8e290de3fe21d29d172b2c /protocols
parentd7e550f551052ae4233e48a41448b8a155b8e013 (diff)
crash on start in Twitter
git-svn-id: http://svn.miranda-ng.org/main/trunk@7978 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/Twitter/src/connection.cpp2
-rw-r--r--protocols/Twitter/src/proto.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index cb54b8b00e..938f9350ff 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -115,9 +115,9 @@ bool TwitterProto::NegotiateConnection()
if (!dbName) {
screenName = dbv.pszVal;
db_set_s(0,m_szModuleName,TWITTER_KEY_NICK,dbv.pszVal);
+ db_free(&dbv);
//debugLogW("**NegotiateConnection - we have a username already in the db - %s", screenName);
}
- db_free(&dbv);
}
// twitter changed the base URL in v1.1 of the API, I don't think users will need to modify it, so
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 35ca3af92f..d034fe6772 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -63,8 +63,6 @@ TwitterProto::TwitterProto(const char *proto_name,const TCHAR *username) :
avatar_lock_ = CreateMutex(0,false,0);
twitter_lock_ = CreateMutex(0,false,0);
- SetAllContactStatuses(ID_STATUS_OFFLINE); // In case we crashed last time
-
// set Tokens and stuff
//mirandas keys
@@ -386,6 +384,8 @@ int TwitterProto::OnModulesLoaded(WPARAM,LPARAM)
evt.descr = "Tweet";
evt.flags = DETF_HISTORY | DETF_MSGWINDOW;
CallService(MS_DB_EVENT_REGISTERTYPE,0,reinterpret_cast<LPARAM>(&evt));
+
+ SetAllContactStatuses(ID_STATUS_OFFLINE); // In case we crashed last time
return 0;
}