Skip to content

Commit

Permalink
* Addressbook.cpp : move storage creation to Start()
Browse files Browse the repository at this point in the history
  • Loading branch information
hagen committed Jun 27, 2016
1 parent 881d065 commit 4e7375c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion AddressBook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ namespace client
}

//---------------------------------------------------------------------
AddressBook::AddressBook (): m_Storage(new AddressBookFilesystemStorage), m_IsLoaded (false), m_IsDownloading (false),
AddressBook::AddressBook (): m_Storage(nullptr), m_IsLoaded (false), m_IsDownloading (false),
m_DefaultSubscription (nullptr), m_SubscriptionsUpdateTimer (nullptr)
{
}
Expand All @@ -215,6 +215,8 @@ namespace client

void AddressBook::Start ()
{
if (!m_Storage)
m_Storage = new AddressBookFilesystemStorage;
m_Storage->Init();
LoadHosts (); /* try storage, then hosts.txt, then download */
StartSubscriptions ();
Expand Down

0 comments on commit 4e7375c

Please sign in to comment.