(PropertyNotification) Fix for adding notifications before ProxyObject's scene object... 36/19436/1
authorJulien Heanley <j.heanley@partner.samsung.com>
Tue, 8 Apr 2014 13:01:52 +0000 (14:01 +0100)
committerVictor Cebollada <v.cebollada@samsung.com>
Fri, 11 Apr 2014 14:21:00 +0000 (15:21 +0100)
[Issue#]   N/A
[Problem]  Calling PropertyNotification::SetNotifyMode could cause a crash in update thread
[Cause]    The message would be sent off to update scene object value even when scene object had not been created
[Solution] Prevent notify mode message from being sent

Change-Id: I36dabb991873fa1efc5fcb8b7f7bf111847cba3e
Signed-off-by: Julien Heanley <j.heanley@partner.samsung.com>
dali/internal/event/common/property-notification-impl.cpp

index 2c28bef..734c4c4 100644 (file)
@@ -188,7 +188,10 @@ Property::Index PropertyNotification::GetTargetProperty() const
 void PropertyNotification::SetNotifyMode( NotifyMode mode )
 {
   mNotifyMode = mode;
-  PropertyNotificationSetNotifyModeMessage( mUpdateManager, mPropertyNotification, mode );
+  if( mPropertyNotification )
+  {
+    PropertyNotificationSetNotifyModeMessage( mUpdateManager, mPropertyNotification, mode );
+  }
 }
 
 PropertyNotification::NotifyMode PropertyNotification::GetNotifyMode()