Skip to content

Commit

Permalink
Fix NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
IntegerLimit committed Dec 29, 2024
1 parent 06d72ef commit eb19f7a
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,18 @@ private void properlyResetScrollbarFilterTyped(char typedChar, int keyCode, Call

@Inject(method = "refreshOverlay", at = @At("HEAD"))
private void fillLabsCache(CallbackInfo ci) {
LabsClientCache.selectedIsOutput = getSelectedInfo().getOutput();

// Reset time
LabsClientCache.lastSelectedRenderChange = System.currentTimeMillis();
LabsClientCache.renderingSelected = true;

LabsClientCache.inputLoc.clear();
LabsClientCache.outputLoc.clear();

var selected = getSelectedInfo();
if (selected == null || selected.getFrequency() == 0) return;

LabsClientCache.selectedIsOutput = getSelectedInfo().getOutput();

// Reset time
LabsClientCache.lastSelectedRenderChange = System.currentTimeMillis();
LabsClientCache.renderingSelected = true;

infos.getSorted().stream()
.filter(info -> info.getFrequency() == selected.getFrequency())
.filter(info -> info.getType() == selected.getType())
Expand Down

0 comments on commit eb19f7a

Please sign in to comment.