summaryrefslogtreecommitdiffstats
path: root/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java')
-rw-r--r--src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
index e917ca2..74ecbdd 100644
--- a/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
+++ b/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
@@ -478,7 +478,8 @@ public class HWShadowmapsSimple {
private BufferedImage readPNGImage(String resourceName) {
try {
- BufferedImage img = ImageIO.read(getClass().getClassLoader().getResourceAsStream(resourceName));
+ // Note: use of BufferedInputStream works around 4764639/4892246
+ BufferedImage img = ImageIO.read(new BufferedInputStream(getClass().getClassLoader().getResourceAsStream(resourceName)));
if (img == null) {
throw new RuntimeException("Error reading resource " + resourceName);
}