backends/drm: don't crash if the surface is nullptr
CCBUG: 474987
This commit is contained in:
parent
1e6f46eb0c
commit
d33c6b5409
1 changed files with 3 additions and 0 deletions
|
@ -168,6 +168,9 @@ bool EglGbmLayerSurface::endRendering(const QRegion &damagedRegion)
|
||||||
|
|
||||||
std::chrono::nanoseconds EglGbmLayerSurface::queryRenderTime() const
|
std::chrono::nanoseconds EglGbmLayerSurface::queryRenderTime() const
|
||||||
{
|
{
|
||||||
|
if (!m_surface) {
|
||||||
|
return std::chrono::nanoseconds::zero();
|
||||||
|
}
|
||||||
const auto cpuTime = m_surface->renderEnd - m_surface->renderStart;
|
const auto cpuTime = m_surface->renderEnd - m_surface->renderStart;
|
||||||
if (m_surface->timeQuery) {
|
if (m_surface->timeQuery) {
|
||||||
m_eglBackend->makeCurrent();
|
m_eglBackend->makeCurrent();
|
||||||
|
|
Loading…
Reference in a new issue