diff options
Diffstat (limited to '')
-rw-r--r-- | gui/resources.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gui/resources.hpp b/gui/resources.hpp index 3cb528176..54a1185c3 100644 --- a/gui/resources.hpp +++ b/gui/resources.hpp @@ -77,8 +77,8 @@ public: virtual ~AnimationResource(); public: - virtual void* GetResource(void) { return mSurfaces.at(0); } - virtual void* GetResource(int entry) { return mSurfaces.at(entry); } + virtual void* GetResource(void) { return mSurfaces.empty() ? NULL : mSurfaces.at(0); } + virtual void* GetResource(int entry) { return mSurfaces.empty() ? NULL : mSurfaces.at(entry); } virtual int GetResourceCount(void) { return mSurfaces.size(); } protected: |