projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3ac835b
)
Possibly fixing Valgrind issue
author
Tobias Markus
<tobbi@mozilla-uk.org>
Sun, 2 Feb 2014 00:50:22 +0000
(
01:50
+0100)
committer
Tobias Markus
<tobbi@mozilla-uk.org>
Sun, 2 Feb 2014 00:50:22 +0000
(
01:50
+0100)
src/video/texture_manager.cpp
patch
|
blob
|
history
diff --git
a/src/video/texture_manager.cpp
b/src/video/texture_manager.cpp
index
0c77a5a
..
7e07d77
100644
(file)
--- a/
src/video/texture_manager.cpp
+++ b/
src/video/texture_manager.cpp
@@
-192,7
+192,9
@@
TextureManager::create_image_texture_raw(const std::string& filename)
}
else
{
- return VideoSystem::new_texture(image.get());
+ TexturePtr texture = VideoSystem::new_texture(image.get());
+ image.reset(NULL);
+ return texture;
}
}
@@
-219,7
+221,9
@@
TextureManager::create_dummy_texture()
else
{
log_warning << "Couldn't load texture '" << dummy_texture_fname << "' (now using empty one): " << err.what() << std::endl;
- return VideoSystem::new_texture(image.get());
+ TexturePtr texture = VideoSystem::new_texture(image.get());
+ image.reset(NULL);
+ return texture;
}
}
}