gbm: Do not create buffers when there is no display
This commit is contained in:
parent
9bda050d84
commit
6cf060223e
1 changed files with 3 additions and 0 deletions
|
@ -58,6 +58,9 @@ KWin::GbmDmaBuf *GbmDmaBuf::createBuffer(const QSize &size, gbm_device *device)
|
||||||
};
|
};
|
||||||
|
|
||||||
EGLDisplay display = kwinApp()->platform()->sceneEglDisplay();
|
EGLDisplay display = kwinApp()->platform()->sceneEglDisplay();
|
||||||
|
if (display == EGL_NO_DISPLAY) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
EGLImageKHR destinationImage = eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, nullptr, importAttributes);
|
EGLImageKHR destinationImage = eglCreateImageKHR(display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, nullptr, importAttributes);
|
||||||
if (destinationImage == EGL_NO_IMAGE_KHR) {
|
if (destinationImage == EGL_NO_IMAGE_KHR) {
|
||||||
close(fd);
|
close(fd);
|
||||||
|
|
Loading…
Reference in a new issue