kde5: avoid crash with null surface
Change-Id: Ie63e62995bee0fd950cea0668f5ae06c903b25a3
This commit is contained in:
committed by
Thorsten Behrens
parent
72c28fb1be
commit
637bbffa30
@@ -340,7 +340,8 @@ void KDE5SalFrame::ReleaseGraphics( SalGraphics *pGraphics )
|
|||||||
if( m_aGraphics[i].pGraphics.get() == pGraphics )
|
if( m_aGraphics[i].pGraphics.get() == pGraphics )
|
||||||
{
|
{
|
||||||
m_aGraphics[i].bInUse = false;
|
m_aGraphics[i].bInUse = false;
|
||||||
cairo_surface_destroy( m_aGraphics[i].pSurface );
|
if ( m_aGraphics[i].pSurface != nullptr )
|
||||||
|
cairo_surface_destroy( m_aGraphics[i].pSurface );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user