Add exception condition to remove timer
authorJihoon Chung <jihoon.chung@samsung.com>
Sat, 8 Jun 2013 04:19:37 +0000 (13:19 +0900)
committerTaejeong Lee <taejeong.lee@samsung.com>
Sat, 8 Jun 2013 14:25:54 +0000 (23:25 +0900)
[Issue#] N/A
[Problem] Crash is occurred during stop timer in the web-clip
[Cause] Period is 0.00 case timer isn't started
[Solution] Add condition checking code before remove timer
[SCMRequest] N/A

Change-Id: I6f39409f42205e7ba2357bf1e69306d16e5098cc

src/Core/BoxUpdateTimer.cpp

index ed60e8c..73974e7 100644 (file)
@@ -52,13 +52,15 @@ void BoxUpdateTimer::start()
         stop();
     }
 
-    m_timer = ecore_timer_add(m_period, m_callback, m_data); 
+    m_timer = ecore_timer_add(m_period, m_callback, m_data);
 }
 
 void BoxUpdateTimer::stop()
 {
-    ecore_timer_del(m_timer);
-    m_timer = NULL;
+    if (m_timer) {
+        ecore_timer_del(m_timer);
+        m_timer = NULL;
+    }
 }
 
 void BoxUpdateTimer::resume()