drm: Do not call the egl backend pointer when it's null

It can be null, that's why we are also checking it down in the same
function.
This commit is contained in:
Aleix Pol 2021-10-20 03:33:01 +02:00 committed by Aleix Pol Gonzalez
parent baebaa9eb4
commit c1a4414c42

View file

@ -275,7 +275,7 @@ bool DrmPipeline::checkTestBuffer()
// try to re-use buffers if possible.
const auto &checkBuffer = [this, backend, &buffer](const QSharedPointer<DrmBuffer> &buf){
const auto &mods = supportedModifiers(buf->format());
if (buf->format() == backend->drmFormat()
if (backend && buf->format() == backend->drmFormat()
&& (mods.isEmpty() || mods.contains(buf->modifier()))
&& buf->size() == sourceSize()) {
buffer = buf;