From 0f6c46f9c054b1ce3224f4c883042638d759d889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9F=D0=B5=D0=BB=D0=B8=D0=BF=D0=B5=D0=BD=D0=BA=D0=BE=20?= =?UTF-8?q?=D0=98=D0=B2=D0=B0=D0=BD?= Date: Sun, 22 Apr 2018 18:17:42 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/libs@376 a8b55f48-bf90-11e4-a774-851b48703e85 --- qglview/glmaterial.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qglview/glmaterial.cpp b/qglview/glmaterial.cpp index f222137..4de1c94 100644 --- a/qglview/glmaterial.cpp +++ b/qglview/glmaterial.cpp @@ -134,7 +134,7 @@ GLuint GLTextureManagerBase::loadTexture(const QImage & im, bool ownership, bool void GLTextureManagerBase::reloadTexture(GLuint tid, const QString & path) { if (!currentGLTextureManager) return; QString p = findFile(path); - if (p.isEmpty()) return; + if (p.isEmpty() || (tid == 0)) return; QImage image(p); createGLTexture(tid, image); if (tid == 0) { @@ -147,7 +147,7 @@ void GLTextureManagerBase::reloadTexture(GLuint tid, const QString & path) { void GLTextureManagerBase::reloadTexture(GLuint tid, const QImage & im) { if (!currentGLTextureManager) return; - if (im.isNull()) return; + if (im.isNull() || (tid == 0)) return; QImage image(im); createGLTexture(tid, image); qDebug() << "[TextureManager] Reloaded" << tid;