scenes/opengl: Fix null dereference in OpenGLWindow::windowTexture()
If the SurfaceItem has no SurfacePixmap, kwin will crash when trying to access the surface texture. BUG: 437709
This commit is contained in:
parent
e004f1b7fc
commit
f2b6a6b2f6
1 changed files with 1 additions and 1 deletions
|
@ -1137,7 +1137,7 @@ QSharedPointer<GLTexture> OpenGLWindow::windowTexture()
|
|||
PlatformOpenGLSurfaceTexture *frame = nullptr;
|
||||
const SurfaceItem *item = surfaceItem();
|
||||
|
||||
if (item) {
|
||||
if (item && item->pixmap()) {
|
||||
frame = static_cast<PlatformOpenGLSurfaceTexture *>(item->pixmap()->platformTexture());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue