diff options
author | Eike Rathke <erack@redhat.com> | 2012-07-16 17:40:52 +0200 |
---|---|---|
committer | Matúš Kukan <matus.kukan@gmail.com> | 2012-07-17 16:40:28 +0200 |
commit | b1032a684c0ddb1fd1aabe979517897f4ba91dd7 (patch) | |
tree | 85b4016a6195a30c465bebad9ba4e47038077ee8 | |
parent | tubes: check mpConference before using it (diff) | |
download | core-b1032a684c0ddb1fd1aabe979517897f4ba91dd7.tar.gz core-b1032a684c0ddb1fd1aabe979517897f4ba91dd7.zip |
tubes: do not use mpManager after unref
Change-Id: If8bb6da915d6470b9796e26c46f3e8f2000879fd
-rw-r--r-- | sc/source/ui/collab/contacts.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sc/source/ui/collab/contacts.cxx b/sc/source/ui/collab/contacts.cxx index 725b1f52fc6c..51bd1e40ff3a 100644 --- a/sc/source/ui/collab/contacts.cxx +++ b/sc/source/ui/collab/contacts.cxx @@ -82,6 +82,9 @@ class TubeContacts : public ModelessDialog void Listen() { + if (!mpManager) + return ; + if (!mpManager->registerClients()) { fprintf( stderr, "Could not register client handlers.\n" ); @@ -103,6 +106,9 @@ class TubeContacts : public ModelessDialog void StartBuddySession() { + if (!mpManager) + return ; + AccountContact *pAC = NULL; if (maList.FirstSelected()) pAC = static_cast<AccountContact*> (maList.FirstSelected()->GetUserData()); @@ -122,6 +128,9 @@ class TubeContacts : public ModelessDialog void StartGroupSession() { + if (!mpManager) + return ; + AccountContact *pAC = NULL; if (maList.FirstSelected()) pAC = static_cast<AccountContact*> (maList.FirstSelected()->GetUserData()); @@ -172,6 +181,7 @@ public: { fprintf( stderr, "Could not create AccountManager.\n" ); mpManager->unref(); + mpManager = NULL; } } maBtnConnect.SetClickHdl( LINK( this, TubeContacts, BtnConnectHdl ) ); @@ -194,7 +204,8 @@ public: } virtual ~TubeContacts() { - mpManager->unref(); + if (mpManager) + mpManager->unref(); } static rtl::OUString fromUTF8( const char *pStr ) |