Commit fec4e058 authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

Do not try to create a gbm dmabuf when gbm is not available

Allows us to take the fallback path instead of just crashing
parent 474060a4
......@@ -31,6 +31,10 @@ GbmDmaBuf::~GbmDmaBuf()
KWin::GbmDmaBuf *GbmDmaBuf::createBuffer(const QSize &size, gbm_device *device)
{
if (!device) {
return nullptr;
}
auto bo = gbm_bo_create(device, size.width(), size.height(), GBM_BO_FORMAT_ARGB8888, GBM_BO_USE_RENDERING | GBM_BO_USE_LINEAR);
if (!bo) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment