summaryrefslogtreecommitdiff
path: root/src/imagesprite.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/imagesprite.h')
-rw-r--r--src/imagesprite.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/imagesprite.h b/src/imagesprite.h
index 5a04f9ed..4fc69927 100644
--- a/src/imagesprite.h
+++ b/src/imagesprite.h
@@ -60,8 +60,13 @@ public:
int getDuration() const override
{ return 0; }
+ // Hack to allow the ImageSprite to be used with SubImage instances, which
+ // are not reference counted.
+ void releaseImageRef()
+ { mImage.release(); }
+
private:
- Image *mImage;
+ ResourceRef<Image> mImage;
};
#endif // IMAGESPRITE_H