EA-252361: Check window for null

(cherry picked from commit 23a7dbd486)
This commit is contained in:
Denis Konoplev
2021-05-20 14:14:25 +03:00
committed by Vitaly Provodin
parent bb2915684a
commit 702dc54df1

View File

@@ -67,8 +67,10 @@ final class FullScreenHandler {
}
static FullScreenHandler getHandlerFor(final RootPaneContainer window) {
final Object value = window.getRootPane().getClientProperty(CLIENT_PROPERTY);
if (value instanceof FullScreenHandler) return (FullScreenHandler)value;
if (window != null && window.getRootPane() != null) {
final Object value = window.getRootPane().getClientProperty(CLIENT_PROPERTY);
if (value instanceof FullScreenHandler) return (FullScreenHandler)value;
}
return null;
}