diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-03-19 08:56:22 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-03-19 08:56:22 +0000 |
commit | d784f6ec7384f9491691070f5d836fda80f277b1 (patch) | |
tree | cf609c4202c027701e9fad51d75fb1538f0f3a62 /protocols | |
parent | c3ac85191fbe50a4afb5a670cb57ff4a189507d0 (diff) |
Facebook: Fix crash when trying to load user info on multichat
git-svn-id: http://svn.miranda-ng.org/main/trunk@8659 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 1627cecb13..9afdbe0e96 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -313,15 +313,18 @@ int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) int FacebookProto::GetInfo(MCONTACT hContact, int infoType)
{
- facebook_user fbu;
- fbu.user_id = ptrA(getStringA(hContact, FACEBOOK_KEY_ID));
+ ptrA user_id(getStringA(hContact, FACEBOOK_KEY_ID));
- if (fbu.user_id.empty())
+ if (user_id == NULL)
return 1;
+
+ facebook_user fbu;
+ fbu.user_id = user_id;
LoadContactInfo(&fbu);
// TODO: don't duplicate code this way, refactor all this userInfo loading
+ // TODO: load more info about user (authorization state,...)
std::string homepage = FACEBOOK_URL_PROFILE + fbu.user_id;
setString(hContact, "Homepage", homepage.c_str());
|