backends/drm: Fix DrmCrtc::queryCurrentMode() accidentally resetting m_crtc to null
Otherwise kwin will likely crash.
This commit is contained in:
parent
1ee3062e45
commit
1dbef2d5ed
1 changed files with 6 additions and 2 deletions
|
@ -58,9 +58,13 @@ bool DrmCrtc::updateProperties()
|
||||||
|
|
||||||
drmModeModeInfo DrmCrtc::queryCurrentMode()
|
drmModeModeInfo DrmCrtc::queryCurrentMode()
|
||||||
{
|
{
|
||||||
m_crtc.reset(drmModeGetCrtc(gpu()->fd(), id()));
|
DrmUniquePtr<drmModeCrtc> crtc(drmModeGetCrtc(gpu()->fd(), id()));
|
||||||
|
if (crtc) {
|
||||||
|
return crtc->mode;
|
||||||
|
} else {
|
||||||
return m_crtc->mode;
|
return m_crtc->mode;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int DrmCrtc::pipeIndex() const
|
int DrmCrtc::pipeIndex() const
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue