diff --git a/core/src/processing/opengl/PGL.java b/core/src/processing/opengl/PGL.java index 964efa98a..0c2bb3e66 100644 --- a/core/src/processing/opengl/PGL.java +++ b/core/src/processing/opengl/PGL.java @@ -1013,7 +1013,11 @@ public class PGL { } catch (GLException e) { // Unwrap GLException so that only the causing exception is shown. Throwable tr = e.getCause(); - throw new RuntimeException(tr); + if (tr instanceof RuntimeException) { + throw (RuntimeException)tr; + } else { + throw new RuntimeException(tr); + } } } }