Fix the crash when it tries to destroy the wrong surface
[platform/core/uifw/dali-adaptor.git] / dali / internal / adaptor / common / adaptor-impl.cpp
index c39903f..d046790 100755 (executable)
@@ -515,6 +515,7 @@ void Adaptor::ReplaceSurface( Any nativeWindow, RenderSurface& newSurface )
 
   // Must delete the old Window only after the render thread has completed the replace
   oldDefaultWindow.surface->DestroySurface();
+  oldDefaultWindow.surface = nullptr;
 }
 
 RenderSurface& Adaptor::GetSurface() const