shortcut rendering textures for empty an rect
it makes no sense and there's a good chance that in this case m_vbo is still nullptr and it will not be created since d->m_cachedSize will be an empty size as well -> nullptr access -> crash BUG: 337090 FIXED-IN: 5.2
This commit is contained in:
parent
8de4e4d84e
commit
f61d3ade84
1 changed files with 2 additions and 0 deletions
|
@ -447,6 +447,8 @@ void GLTexture::unbind()
|
|||
void GLTexture::render(QRegion region, const QRect& rect, bool hardwareClipping)
|
||||
{
|
||||
Q_D(GLTexture);
|
||||
if (rect.isEmpty())
|
||||
return; // nothing to paint and m_vbo is likely nullptr and d->m_cachedSize empty as well, #337090
|
||||
if (rect.size() != d->m_cachedSize) {
|
||||
d->m_cachedSize = rect.size();
|
||||
QRect r(rect);
|
||||
|
|
Loading…
Reference in a new issue