Message ID | 20110913163313.22571.15902.launchpad@ackee.canonical.com |
---|---|
State | Accepted |
Headers | show |
=== modified file 'src/scene-desktop.cpp' --- src/scene-desktop.cpp 2011-09-13 09:36:32 +0000 +++ src/scene-desktop.cpp 2011-09-13 16:31:11 +0000 @@ -141,10 +141,16 @@ virtual void release() { /* Release resources */ - glDeleteTextures(1, &texture_); - glDeleteFramebuffers(1, &fbo_); - texture_ = 0; - fbo_ = 0; + if (texture_ != 0) + { + glDeleteTextures(1, &texture_); + texture_ = 0; + } + if (fbo_ != 0) + { + glDeleteFramebuffers(1, &fbo_); + fbo_ = 0; + } /* * Release the shader program when object of this class