fixes loadPixels() regression in opengl renderer

This commit is contained in:
codeanticode
2014-05-05 14:33:22 -04:00
parent b8d4b62158
commit c7c99b80a0
2 changed files with 10 additions and 7 deletions

View File

@@ -329,8 +329,7 @@ public class Texture implements PConstants {
return;
}
if (pixels.length == 0) {
// Nothing to do (means that w == h == 0) but not an erroneous situation
if (pixels.length == 0 || w == 0 || h == 0) {
return;
}