Add exception for unsupported EGL or DDK 62/38962/2
authortaeyoon <taeyoon0.lee@samsung.com>
Mon, 4 May 2015 07:47:08 +0000 (16:47 +0900)
committertaeyoon <taeyoon0.lee@samsung.com>
Mon, 4 May 2015 08:22:34 +0000 (17:22 +0900)
Change-Id: I70fbb1397125206c4379a24a6f75fb7a9c8d9870

adaptors/wayland/egl-implementation-wl.cpp
adaptors/x11/egl-implementation-x.cpp

index 3e721f1..fcbfe63 100644 (file)
@@ -76,6 +76,12 @@ bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwn
 
     //@todo see if we can just EGL_DEFAULT_DISPLAY instead
     mEglDisplay = eglGetDisplay(mEglNativeDisplay);
+    EGLint error = eglGetError();
+
+    if( mEglDisplay == NULL && error != EGL_SUCCESS )
+    {
+      throw Dali::DaliException( "", "OpenGL ES is not supported" );
+    }
 
     EGLint majorVersion = 0;
     EGLint minorVersion = 0;
index fc3979e..07b01d5 100644 (file)
@@ -76,6 +76,12 @@ bool EglImplementation::InitializeGles( EGLNativeDisplayType display, bool isOwn
 
     //@todo see if we can just EGL_DEFAULT_DISPLAY instead
     mEglDisplay = eglGetDisplay(mEglNativeDisplay);
+    EGLint error = eglGetError();
+
+    if( mEglDisplay == NULL && error != EGL_SUCCESS )
+    {
+      throw Dali::DaliException( "", "OpenGL ES is not supported");
+    }
 
     EGLint majorVersion = 0;
     EGLint minorVersion = 0;