Skip to content

Commit d0ab2b7

Browse files
author
Julian Kast
committed
Added Null check for artwork
1 parent 182196a commit d0ab2b7

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

base/src/main/java/com/smartdevicelink/managers/screen/choiceset/ChoiceCell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public int hashCode() {
224224
result += ((getText() == null) ? 0 : Integer.rotateLeft(getText().hashCode(), 1));
225225
result += ((getSecondaryText() == null) ? 0 : Integer.rotateLeft(getSecondaryText().hashCode(), 2));
226226
result += ((getTertiaryText() == null) ? 0 : Integer.rotateLeft(getTertiaryText().hashCode(), 3));
227-
result += Integer.rotateLeft(getArtwork().hashCode(), 4);
227+
result += ((getArtwork() == null) ? 0 : Integer.rotateLeft(getArtwork().hashCode(), 4));
228228
result += ((getSecondaryArtwork() == null || getSecondaryArtwork().getName() == null) ? 0 : Integer.rotateLeft(getSecondaryArtwork().getName().hashCode(), 5));
229229
result += ((getVoiceCommands() == null) ? 0 : Integer.rotateLeft(getVoiceCommands().hashCode(), 6));
230230
return result;

base/src/main/java/com/smartdevicelink/managers/screen/menu/MenuCell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ int getParentCellId() {
299299
public int hashCode() {
300300
int result = 1;
301301
result += ((getTitle() == null) ? 0 : Integer.rotateLeft(getTitle().hashCode(), 1));
302-
result += Integer.rotateLeft(getIcon().hashCode(), 2);
302+
result += ((getIcon() == null) ? 0 : Integer.rotateLeft(getIcon().hashCode(), 2));
303303
result += ((getVoiceCommands() == null) ? 0 : Integer.rotateLeft(getVoiceCommands().hashCode(), 3));
304304
result += ((getSubCells() == null) ? 0 : Integer.rotateLeft(1, 4));
305305
return result;

0 commit comments

Comments
 (0)