Bug fixes for 2d physics
[platform/core/uifw/dali-toolkit.git] / dali-physics / internal / physics-world-impl.cpp
index cd43633..b0ca04d 100644 (file)
@@ -96,11 +96,11 @@ bool PhysicsWorld::OnUpdate(Dali::UpdateProxy& updateProxy, float elapsedSeconds
   if(mNotifySyncPoint != Dali::UpdateProxy::INVALID_SYNC &&
      mNotifySyncPoint == updateProxy.PopSyncPoint())
   {
-    do
+    while(!commandQueue.empty())
     {
       commandQueue.front()(); // Execute the queued methods
       commandQueue.pop();
-    } while(!commandQueue.empty());
+    }
 
     mNotifySyncPoint = Dali::UpdateProxy::INVALID_SYNC;
   }