Fix a crash on Ubuntu 71/229571/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 2 Apr 2020 04:22:14 +0000 (13:22 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 2 Apr 2020 04:22:14 +0000 (13:22 +0900)
ecore_x_init() should be called before a window is created.

Change-Id: I36ffc65f5f509a90691bce36178f1a41d9ca03a5

dali/internal/window-system/ubuntu-x11/window-base-ecore-x.cpp

index 07d6ea4..ab67b43 100755 (executable)
@@ -20,6 +20,7 @@
 
 // INTERNAL HEADERS
 #include <dali/internal/window-system/common/window-impl.h>
+#include <dali/internal/window-system/common/window-system.h>
 #include <dali/internal/window-system/common/window-render-surface.h>
 #include <dali/internal/window-system/ubuntu-x11/ecore-x-types.h>
 
@@ -263,6 +264,8 @@ WindowBaseEcoreX::~WindowBaseEcoreX()
   if( mOwnSurface )
   {
     ecore_x_window_free( mEcoreWindow );
+
+    WindowSystem::Shutdown();
   }
 }
 
@@ -274,6 +277,8 @@ void WindowBaseEcoreX::Initialize( PositionSize positionSize, Any surface, bool
   // if the surface is empty, create a new one.
   if( surfaceId == 0 )
   {
+    WindowSystem::Initialize();
+
     // we own the surface about to created
     mOwnSurface = true;
     CreateWindow( positionSize, isTransparent );