Account for OpenGLWindow::windowPixmap returning nullptr sometimes

This commit is contained in:
Aleix Pol 2020-07-31 19:49:15 +02:00
parent 405841caf2
commit d4cd2b5a6a

View file

@ -1540,7 +1540,7 @@ QSharedPointer<GLTexture> OpenGLWindow::windowTexture()
{
auto frame = windowPixmap<OpenGLWindowPixmap>();
if (frame->children().isEmpty()) {
if (frame && frame->children().isEmpty()) {
return QSharedPointer<GLTexture>(new GLTexture(*frame->texture()));
} else {
auto effectWindow = window()->effectWindow();