[Tizen] Temporarily modified so that window is no null if multi-window is not supported 17/230117/1 accepted/tizen/unified/20200409.083648 submit/tizen/20200408.061309
authorSunghyun Kim <scholb.kim@samsung.com>
Wed, 8 Apr 2020 05:24:53 +0000 (14:24 +0900)
committerSunghyun Kim <scholb.kim@samsung.com>
Wed, 8 Apr 2020 05:24:53 +0000 (14:24 +0900)
Change-Id: I3ffbfd8ea4ed44a6c1bd05e2914d562f80516bf8

dali/public-api/adaptor-framework/window.cpp

index 9d8c830..4741340 100644 (file)
@@ -48,24 +48,21 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
     Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
     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");
+  }
 
-    Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
+  Internal::Adaptor::Window* window = Internal::Adaptor::Window::New(posSize, name, className, isTransparent);
 
-    if (isAdaptorAvailable)
-    {
-      Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
-    }
-    newWindow = Window(window);
-  }
-  else
+  Integration::SceneHolder sceneHolder = Integration::SceneHolder(window);
+
+  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;
 }