summaryrefslogtreecommitdiff
path: root/src/resources/subimage.cpp
diff options
context:
space:
mode:
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;
}