diff options
Diffstat (limited to 'source/gameengine')
-rw-r--r-- | source/gameengine/VideoTexture/ImageBase.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/gameengine/VideoTexture/ImageBase.cpp b/source/gameengine/VideoTexture/ImageBase.cpp index 88a20fadcf7..bbeebfb590f 100644 --- a/source/gameengine/VideoTexture/ImageBase.cpp +++ b/source/gameengine/VideoTexture/ImageBase.cpp @@ -56,7 +56,8 @@ m_staticSources(staticSrc), m_pyfilter(NULL) ImageBase::~ImageBase (void) { // release image - delete [] m_image; + if (m_image) + delete [] m_image; } @@ -198,7 +199,8 @@ void ImageBase::init (short width, short height) // set new buffer size m_imgSize = newSize; // release previous and create new buffer - delete [] m_image; + if (m_image) + delete [] m_image; m_image = new unsigned int[m_imgSize]; } // new image size |