scene/imageitem: don't crash if uploading a texture fails
BUG: 474952
This commit is contained in:
parent
684595dab7
commit
1e6f46eb0c
1 changed files with 3 additions and 0 deletions
|
@ -50,6 +50,9 @@ void ImageItemOpenGL::preprocess()
|
|||
|
||||
if (!m_texture || m_texture->size() != m_image.size()) {
|
||||
m_texture = GLTexture::upload(m_image);
|
||||
if (!m_texture) {
|
||||
return;
|
||||
}
|
||||
m_texture->setFilter(GL_LINEAR);
|
||||
m_texture->setWrapMode(GL_CLAMP_TO_EDGE);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue