summaryrefslogtreecommitdiff
path: root/src/resources/subimage.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-28 16:30:50 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-29 00:18:56 +0300
commit57726c7324f165c70671fc5b05d6c0964f56b870 (patch)
tree8a9f37914c18f9c6ec6d64da08834af245afe0f3 /src/resources/subimage.cpp
parentee1a05faf157c8c9f0f43cf5b906d84f39ded497 (diff)
downloadmv-57726c7324f165c70671fc5b05d6c0964f56b870.tar.gz
mv-57726c7324f165c70671fc5b05d6c0964f56b870.tar.bz2
mv-57726c7324f165c70671fc5b05d6c0964f56b870.tar.xz
mv-57726c7324f165c70671fc5b05d6c0964f56b870.zip
improve debug checkers.
add missing surface functions for debugging.
Diffstat (limited to 'src/resources/subimage.cpp')
-rw-r--r--src/resources/subimage.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resources/subimage.cpp b/src/resources/subimage.cpp
index a13a885bb..d3dec55d5 100644
--- a/src/resources/subimage.cpp
+++ b/src/resources/subimage.cpp
@@ -185,6 +185,10 @@ SubImage::SubImage(Image *const parent, const GLuint image,
SubImage::~SubImage()
{
+#ifdef DEBUG_IMAGES
+ logger->log("delete subimage: %p", static_cast<void*>(this));
+ logger->log(" %s, %s", mIdPath.c_str(), mSource.c_str());
+#endif
// Avoid destruction of the image
mSDLSurface = nullptr;
// Avoid possible destruction of its alpha channel
@@ -198,6 +202,10 @@ SubImage::~SubImage()
#endif
if (mParent)
{
+#ifdef DEBUG_IMAGES
+ logger->log("decref from subminage: %p, parent: %p",
+ static_cast<void*>(this), static_cast<void*>(mParent));
+#endif
mParent->decRef();
mParent = nullptr;
}