Skip to content

Commit

Permalink
drm: avoid crash on nullptr cursors
Browse files Browse the repository at this point in the history
  • Loading branch information
vaxerski committed Jul 12, 2024
1 parent 7bbdf32 commit 13cf434
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/drm/DRM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 13cf434

Please sign in to comment.