Merge "Fix potential crash in ImageTransformState"

This commit is contained in:
Treehugger Robot
2023-01-10 16:34:56 +00:00
committed by Gerrit Code Review

View File

@@ -53,7 +53,9 @@ public class ImageTransformState extends TransformState {
return true; return true;
} }
if (otherState instanceof ImageTransformState) { if (otherState instanceof ImageTransformState) {
return mIcon != null && mIcon.sameAs(((ImageTransformState) otherState).getIcon()); final Icon otherIcon = ((ImageTransformState) otherState).mIcon;
return mIcon == otherIcon || (mIcon != null && otherIcon != null && mIcon.sameAs(
otherIcon));
} }
return false; return false;
} }