[Tizen] Temporarily modified so that window is no null
[platform/core/uifw/dali-adaptor.git] / dali / public-api / adaptor-framework / window.cpp
index 9d8c830..d82b0c6 100644 (file)
@@ -49,23 +49,20 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
     isNewWindowAllowed = Internal::Adaptor::Adaptor::GetImplementation(adaptor).IsMultipleWindowSupported();
   }
 
-  if (isNewWindowAllowed)
+  if (!isNewWindowAllowed)
   {
-    Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
+    DALI_LOG_ERROR("This device can't support multiple windows.\n");
+  }
+  Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
 
-    Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
+  Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
 
-    if (isAdaptorAvailable)
-    {
-      Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
-    }
-    newWindow = Window(window);
-  }
-  else
+  if (isAdaptorAvailable)
   {
-    DALI_LOG_ERROR("This device can't support multiple windows.\n");
+    Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
+    Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
   }
+  newWindow = Window(window);
 
   return newWindow;
 }