diff options
Diffstat (limited to 'src/egl/main/egldriver.c')
-rw-r--r-- | src/egl/main/egldriver.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index 5d5b7daa418..92ea6450944 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -52,8 +52,12 @@ _eglGetDriver(void) { mtx_lock(&_eglModuleMutex); - if (!_eglDriver) - _eglDriver = _eglBuiltInDriver(); + if (!_eglDriver) { + _eglDriver = calloc(1, sizeof(*_eglDriver)); + if (!_eglDriver) + return NULL; + _eglInitDriver(_eglDriver); + } mtx_unlock(&_eglModuleMutex); |