[PATCH 6/7] Do not initialize NoteOfTheDayAddin on create.



1) It pretty much defeats purpose of storing disabled status in
configuration file.

2) When started disabled it caused segfault because m_manager was NULL. It
was caused by the fact tha first initialize() call was called when
Gnote::obj().default_note_manager() == NULL.

If add-in was reinitialized m_manager was overwritten with correct value
and delayed work in check_new_day() accessed not-null m_manager.

Signed-off-by: Łukasz Krotowski <lukasz krotowski gmail com>
---
 .../noteoftheday/noteofthedayapplicationaddin.cpp  |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp b/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
index 1610262..11b2f4f 100644
--- a/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
+++ b/src/addins/noteoftheday/noteofthedayapplicationaddin.cpp
@@ -69,7 +69,6 @@ NoteOfTheDayApplicationAddin::NoteOfTheDayApplicationAddin()
   , m_manager(0)
   , m_timeout()
 {
-  initialize();
 }
 
 NoteOfTheDayApplicationAddin::~NoteOfTheDayApplicationAddin()
-- 
1.7.1



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]