Use correct macro in Stage & fix wild pointer issue in RenderTaskList 68/199068/4
authoradun <xiaohui.fang@samsung.com>
Fri, 1 Feb 2019 09:43:23 +0000 (17:43 +0800)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Wed, 27 Mar 2019 17:25:56 +0000 (17:25 +0000)
Change-Id: I60e17c9cc8d1e0e1882db36bb2454e02a2a5eafd

dali/devel-api/common/stage-devel.h [changed mode: 0644->0755]
dali/internal/event/render-tasks/render-task-list-impl.cpp [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index ca754f9..1ac8f20
@@ -79,7 +79,7 @@ DALI_CORE_API Rendering GetRenderingBehavior( Dali::Stage stage );
  * @note If the rootActor is destroyed, then the callback is automatically removed
  * @see FrameCallbackInterface
  */
-DALI_IMPORT_API void AddFrameCallback( Dali::Stage stage, FrameCallbackInterface& frameCallback, Actor rootActor );
+DALI_CORE_API void AddFrameCallback( Dali::Stage stage, FrameCallbackInterface& frameCallback, Actor rootActor );
 
 /**
  * @brief Removes the specified FrameCallbackInterface implementation from being called on every frame.
@@ -90,7 +90,7 @@ DALI_IMPORT_API void AddFrameCallback( Dali::Stage stage, FrameCallbackInterface
  * @note This function will block if the FrameCallbackInterface::Update method is being processed in the update-thread.
  * @note If the callback implementation has already been removed, then this is a no-op.
  */
-DALI_IMPORT_API void RemoveFrameCallback( Dali::Stage stage, FrameCallbackInterface& frameCallback );
+DALI_CORE_API void RemoveFrameCallback( Dali::Stage stage, FrameCallbackInterface& frameCallback );
 
 } // namespace DevelStage
 
old mode 100644 (file)
new mode 100755 (executable)
index eb4bbf6..96e454b
@@ -70,7 +70,9 @@ void RenderTaskList::RemoveTask( Internal::RenderTask& task )
 {
   for ( RenderTaskContainer::iterator iter = mTasks.begin(); mTasks.end() != iter; ++iter )
   {
-    if ( iter->Get() == &task )
+    RenderTask *ptr = iter->Get();
+
+    if ( ptr == &task )
     {
       const SceneGraph::RenderTask& sceneObject = task.GetRenderTaskSceneObject();
 
@@ -81,7 +83,7 @@ void RenderTaskList::RemoveTask( Internal::RenderTask& task )
 
       for ( Vector< Exclusive >::Iterator exclusiveIt = mExclusives.Begin(); exclusiveIt != mExclusives.End(); ++exclusiveIt )
       {
-        if ( exclusiveIt->renderTaskPtr == iter->Get() )
+        if ( exclusiveIt->renderTaskPtr == ptr )
         {
           mExclusives.Erase( exclusiveIt );
           break;