mirror of https://github.com/qt/qtdatavis3d.git
Fix another crash at app shutdown.
Context doesn't exist on all envs at shutdown. Change-Id: I6c0398203f0ab3ceaa38f64936cdf375c43e9f55 Reviewed-by: Tomi Korpipää <tomi.korpipaa@digia.com>
This commit is contained in:
parent
d430a51768
commit
bed7f3fbf6
|
|
@ -54,10 +54,9 @@ GLuint LabelItem::textureId() const
|
|||
|
||||
void LabelItem::clear()
|
||||
{
|
||||
if (m_textureId) {
|
||||
if (m_textureId && QOpenGLContext::currentContext())
|
||||
QOpenGLContext::currentContext()->functions()->glDeleteTextures(1, &m_textureId);
|
||||
m_textureId = 0;
|
||||
}
|
||||
m_textureId = 0;
|
||||
m_size = QSize(0, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue