Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Niels van de Weem committed Apr 21, 2024
1 parent 2fb47c4 commit eb20d65
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/com/getpcpanel/device/Device.java
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,10 @@ public void focusApplicationChanged() {
var images = getKnobImages();
for (var i = 0; i < images.length; i++) {
var idx = i;
currentProfile().getDialData(i).getCommand(CommandVolumeFocus.class).ifPresent(c -> determineAndSetImage(idx));
var dialData = currentProfile().getDialData(i);
if (dialData != null) {
dialData.getCommand(CommandVolumeFocus.class).ifPresent(c -> determineAndSetImage(idx));
}
}
}

Expand Down

0 comments on commit eb20d65

Please sign in to comment.