Do not try to create a gbm dmabuf when gbm is not available
Allows us to take the fallback path instead of just crashing
This commit is contained in:
parent
474060a456
commit
fec4e058e5
1 changed files with 4 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue