diff options
author | Sven Gothel <[email protected]> | 2011-03-30 14:20:14 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-03-30 14:20:14 +0200 |
commit | ff32688c4520373468315b6dad4ec26f481bcd00 (patch) | |
tree | 7ac8b401d82e5a472876a3d89c7153abf6c42ee0 /src/demo/ReadBufferUtil.java | |
parent | dbc74b98eb7429cbb51f7af0572ab53ddd0d9edc (diff) |
Avoid NPE in Screenshot/ReadBufferUtil
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; } |