drm: Be safe against blob destruction
This commit is contained in:
parent
ab4684078c
commit
04e9eaebe3
1 changed files with 2 additions and 2 deletions
|
@ -845,9 +845,9 @@ int drm_commit(struct drm_t *drm, struct Composite_t *pComposite, struct VulkanP
|
||||||
|
|
||||||
for ( size_t i = 0; i < drm->crtcs.size(); i++ )
|
for ( size_t i = 0; i < drm->crtcs.size(); i++ )
|
||||||
{
|
{
|
||||||
if ( drm->current.mode_id )
|
if ( drm->pending.mode_id != drm->current.mode_id )
|
||||||
drmModeDestroyPropertyBlob(drm->fd, drm->current.mode_id);
|
drmModeDestroyPropertyBlob(drm->fd, drm->current.mode_id);
|
||||||
if ( drm->current.gamma_lut_id )
|
if ( drm->pending.gamma_lut_id != drm->current.gamma_lut_id )
|
||||||
drmModeDestroyPropertyBlob(drm->fd, drm->current.gamma_lut_id);
|
drmModeDestroyPropertyBlob(drm->fd, drm->current.gamma_lut_id);
|
||||||
drm->crtcs[i].current = drm->crtcs[i].pending;
|
drm->crtcs[i].current = drm->crtcs[i].pending;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue