mirror of
https://github.com/hyprwm/aquamarine.git
synced 2025-12-20 04:40:12 +01:00
drm/atomic: fix atomic reset being skipped, check nullptr elsewhere instead (#149)
This commit is contained in:
parent
2ff06343aa
commit
e62592f0f4
2 changed files with 2 additions and 5 deletions
|
|
@ -909,7 +909,7 @@ int Aquamarine::CDRMBackend::drmFD() {
|
|||
static void handlePF(int fd, unsigned seq, unsigned tv_sec, unsigned tv_usec, unsigned crtc_id, void* data) {
|
||||
auto pageFlip = (SDRMPageFlip*)data;
|
||||
|
||||
if (!pageFlip->connector)
|
||||
if (!pageFlip || !pageFlip->connector)
|
||||
return;
|
||||
|
||||
pageFlip->connector->isPageFlipPending = false;
|
||||
|
|
|
|||
|
|
@ -244,10 +244,7 @@ bool Aquamarine::CDRMAtomicRequest::commit(uint32_t flagssss) {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!conn)
|
||||
return false;
|
||||
|
||||
if (auto ret = drmModeAtomicCommit(backend->gpu->fd, req, flagssss, &conn->pendingPageFlip); ret) {
|
||||
if (auto ret = drmModeAtomicCommit(backend->gpu->fd, req, flagssss, conn ? &conn->pendingPageFlip : nullptr); ret) {
|
||||
backend->log((flagssss & DRM_MODE_ATOMIC_TEST_ONLY) ? AQ_LOG_DEBUG : AQ_LOG_ERROR,
|
||||
std::format("atomic drm request: failed to commit: {}, flags: {}", strerror(ret == -1 ? errno : -ret), flagsToStr(flagssss)));
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue