summaryrefslogtreecommitdiff
path: root/protocols/Skype/src/skype_subclassing.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Skype/src/skype_subclassing.cpp')
-rw-r--r--protocols/Skype/src/skype_subclassing.cpp23
1 files changed, 9 insertions, 14 deletions
diff --git a/protocols/Skype/src/skype_subclassing.cpp b/protocols/Skype/src/skype_subclassing.cpp
index c206f65ef5..bb943a708e 100644
--- a/protocols/Skype/src/skype_subclassing.cpp
+++ b/protocols/Skype/src/skype_subclassing.cpp
@@ -43,12 +43,6 @@ void CAccount::OnChange(int prop)
}
-void CContact::SetOnContactChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto)
-{
- this->proto = proto;
- this->callback = callback;
-}
-
void CAccount::BlockWhileLoggingIn()
{
while (this->isLoggedOut)
@@ -72,17 +66,18 @@ void CContactGroup::OnChange(const ContactRef& contact)
CContact::CContact(unsigned int oid, SERootObject* root) : Contact(oid, root)
{
+ this->proto = NULL;
+ this->callback == NULL;
}
-//void CAccount::SetOnChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto)
-//{
-// this->proto = proto;
-// this->callback = callback;
-//}
+void CContact::SetOnContactChangeCallback(OnContactChangeFunc callback, CSkypeProto* proto)
+{
+ this->proto = proto;
+ this->callback = callback;
+}
void CContact::OnChange(int prop)
{
- //SEString identity;
- //this->GetIdentity(identity);
- (proto->*callback)(this, prop);
+ if (this->callback && this->proto)
+ (proto->*callback)(this, prop);
} \ No newline at end of file