From 34f4b1928ea5ae86b7ead92d8dc2c53842499f31 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 31 Jan 2014 20:09:27 +0000 Subject: crash on start in Twitter git-svn-id: http://svn.miranda-ng.org/main/trunk@7978 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Twitter/src/connection.cpp | 2 +- protocols/Twitter/src/proto.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/Twitter') 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(&evt)); + + SetAllContactStatuses(ID_STATUS_OFFLINE); // In case we crashed last time return 0; } -- cgit v1.2.3