egl: Return NULL if we fail to load a default driver
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 27 May 2010 01:33:18 +0000 (21:33 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 27 May 2010 13:59:27 +0000 (09:59 -0400)
src/egl/main/egldriver.c

index 566554d51dc8bbe2127f554a6074c62cda3c9369..2f42e64fbe00ef1849a7104569ef453a26c05960 100644 (file)
@@ -571,7 +571,7 @@ _eglLoadDefaultDriver(EGLDisplay dpy, EGLint *major, EGLint *minor)
 
    _eglUnlockMutex(_eglGlobal.Mutex);
 
-   return drv;
+   return _eglGlobal.NumDrivers > 0 ? drv : NULL;
 }