summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJared Adams <jaxad0127@gmail.com>2010-05-21 13:26:42 -0600
committerJared Adams <jaxad0127@gmail.com>2010-05-21 13:39:58 -0600
commit2953a3f92c5097bd99ff21f4536fe167a32d90c5 (patch)
tree49093516cafbe8eaef526931dfa89c44849ab40b /src
parent910ea1476664d8a11d57eaf8ff7f281bcfacd184 (diff)
downloadmana-2953a3f92c5097bd99ff21f4536fe167a32d90c5.tar.gz
mana-2953a3f92c5097bd99ff21f4536fe167a32d90c5.tar.bz2
mana-2953a3f92c5097bd99ff21f4536fe167a32d90c5.tar.xz
mana-2953a3f92c5097bd99ff21f4536fe167a32d90c5.zip
Fix a crash dealing with rescaled overlays under SDL
Reviewed-by: Philipp Sehmisch
Diffstat (limited to 'src')
-rw-r--r--src/resources/ambientlayer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/resources/ambientlayer.cpp b/src/resources/ambientlayer.cpp
index 780baf00..50fe8bd9 100644
--- a/src/resources/ambientlayer.cpp
+++ b/src/resources/ambientlayer.cpp
@@ -51,6 +51,7 @@ AmbientLayer::AmbientLayer(Image *img, float parallax,
std::string idPath = mImage->getIdPath() + "_rescaled";
ResourceManager::getInstance()->addResource(idPath, rescaledOverlay);
mImage = rescaledOverlay;
+ rescaledOverlay->incRef();
}
else
mImage->incRef();