projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
79e34a1
)
Fix coverity #29405: Unchecked dynamic_cast
author
Tobias Markus
<tobbi@mozilla-uk.org>
Sat, 14 Feb 2015 16:07:49 +0000
(17:07 +0100)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Sat, 14 Feb 2015 16:07:49 +0000
(17:07 +0100)
src/video/texture_manager.cpp
patch
|
blob
|
history
diff --git
a/src/video/texture_manager.cpp
b/src/video/texture_manager.cpp
index
e7c392f
..
6dba671
100644
(file)
--- a/
src/video/texture_manager.cpp
+++ b/
src/video/texture_manager.cpp
@@
-259,7
+259,11
@@
TextureManager::save_textures()
for(ImageTextures::iterator i = m_image_textures.begin();
i != m_image_textures.end(); ++i)
{
- save_texture(dynamic_cast<GLTexture*>(i->second.lock().get()));
+ GLTexture* texture = dynamic_cast<GLTexture*>(i->second.lock().get());
+ if(texture == NULL)
+ continue;
+
+ save_texture(texture);
}
}