Avoid a null pointer deref when openGL windows are present
m_context2d in QWasmWindow might be null if the window uses OpenGL for rendering. It is dereferenced nevertheless in ::paint(), which should be avoided. Change-Id: Id817f3663bb475d55dfc916b4b7eb255a88cea9d Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
This commit is contained in:
parent
5d41ec46e9
commit
9bc74d14f3
@ -294,7 +294,7 @@ QWasmScreen *QWasmWindow::platformScreen() const
|
||||
|
||||
void QWasmWindow::paint()
|
||||
{
|
||||
if (!m_backingStore || !isVisible())
|
||||
if (!m_backingStore || !isVisible() || m_context2d.isUndefined())
|
||||
return;
|
||||
|
||||
auto image = m_backingStore->getUpdatedWebImage(this);
|
||||
|
Loading…
Reference in New Issue
Block a user