JInternalFrame.getDesktopIcon() can be null as setDesktopIcon() can be called with null value. There are many places in JInternalFrame where getDesktopIcon() is accessed without null check which might cause NPE. Added null check for those cases.
------------- Commit messages: - 5015261: JInternalFrame causes NPE Changes: https://git.openjdk.java.net/jdk/pull/4989/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=4989&range=00 Issue: https://bugs.openjdk.java.net/browse/JDK-5015261 Stats: 72 lines in 2 files changed: 63 ins; 0 del; 9 mod Patch: https://git.openjdk.java.net/jdk/pull/4989.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/4989/head:pull/4989 PR: https://git.openjdk.java.net/jdk/pull/4989