aboutsummaryrefslogtreecommitdiffstats
path: root/src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java')
-rw-r--r--src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java b/src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java
index 97d7c0e30..296ea3a44 100644
--- a/src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java
+++ b/src/classes/com/sun/opengl/impl/NativeWindowFactoryImpl.java
@@ -43,17 +43,12 @@ public class NativeWindowFactoryImpl extends NativeWindowFactory {
// This subclass of NativeWindowFactory handles the case of
// NativeWindows and AWT Components being passed in
protected NativeWindow getNativeWindowImpl(Object winObj) throws IllegalArgumentException {
- if (null==winObj) {
+ if (null == winObj) {
throw new IllegalArgumentException("winObj is null");
}
if (winObj instanceof NativeWindow) {
- NativeWindow nw = (NativeWindow) winObj;
- Object wrappedWindow = nw.getWrappedWindow();
- if (wrappedWindow == null) {
- // Use the NativeWindow directly
- return nw;
- }
- winObj = wrappedWindow;
+ // Use the NativeWindow directly
+ return (NativeWindow) winObj;
}
if (GLReflection.isAWTComponent(winObj)) {