diff --git a/platform/util/src/com/intellij/util/ui/UIUtil.java b/platform/util/src/com/intellij/util/ui/UIUtil.java index b1d27b3c27fb..5bc953b1c891 100644 --- a/platform/util/src/com/intellij/util/ui/UIUtil.java +++ b/platform/util/src/com/intellij/util/ui/UIUtil.java @@ -314,13 +314,16 @@ public class UIUtil { } try { - isRetina = (getScaleFactorMethod == null) || ((Integer)getScaleFactorMethod.invoke(device) != 1); + isRetina = getScaleFactorMethod == null || (Integer)getScaleFactorMethod.invoke(device) != 1; } catch (IllegalAccessException e) { LOG.debug("CGraphicsDevice.getScaleFactor(): Access issue"); isRetina = false; } catch (InvocationTargetException e) { LOG.debug("CGraphicsDevice.getScaleFactor(): Invocation issue"); isRetina = false; + } catch (IllegalArgumentException e) { + LOG.debug("object is not an instance of declaring class: " + device.getClass().getName()); + isRetina = false; } devicesToRetinaSupportCacheMap.put(device, isRetina);