diff options
Diffstat (limited to 'src/demo/ReadBufferUtil.java')
-rw-r--r-- | src/demo/ReadBufferUtil.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/demo/ReadBufferUtil.java b/src/demo/ReadBufferUtil.java index 1de61974b..9a2da0d7e 100644 --- a/src/demo/ReadBufferUtil.java +++ b/src/demo/ReadBufferUtil.java @@ -95,11 +95,13 @@ public class ReadBufferUtil { } @SuppressWarnings("deprecation") - public void dispose() { + public void dispose() { readTexture.dispose(); readTextureData = null; - readPixelBuffer.clear(); - readPixelBuffer = null; + if(null != readPixelBuffer) { + readPixelBuffer.clear(); + readPixelBuffer = null; + } readPixelSizeLast = 0; } |