drm: avoid crash on nullptr cursors

This commit is contained in:
Vaxry 2024-07-12 15:52:23 +02:00
parent 7bbdf32fb8
commit 13cf43497e

View file

@ -1444,7 +1444,7 @@ SP<IBackendImplementation> Aquamarine::CDRMOutput::getBackend() {
}
bool Aquamarine::CDRMOutput::setCursor(SP<IBuffer> buffer, const Vector2D& hotspot) {
if (!buffer->dmabuf().success) {
if (buffer && !buffer->dmabuf().success) {
backend->backend->log(AQ_LOG_ERROR, "drm: Cursor buffer has to be a dmabuf");
return false;
}