Tempad

Tempad

18M Downloads

[Bug]: FabricWaystones getOwner should have null check

TheWinABagel opened this issue · 2 comments

commented

Bug Description

.filter(waystoneValue -> waystoneValue.isGlobal() || waystoneValue.getEntity().getOwner().equals(player.getUUID()))
does not have a null check for the getOwner call
adding one, ie this
.filter(waystoneValue -> waystoneValue.isGlobal() || (waystoneValue.getEntity().getOwner() != null && waystoneValue.getEntity().getOwner().equals(player.getUUID())))
would resolve this issue
I'd make a pr but I'm lazy :sad

How to Reproduce?

Unsure, had a crash on aof7 NA with this though so it must be able to happen somehow

Expected Behavior

No crashy

Version

2.2.4

Mod Loader Version

loader 0.14.24, fabric-api 0.91.0

Mod Loader

Fabric

Logs or additional context

I don't have the full log, as the crash report shows a different (unrelated) save issue, but here's a snippet
java.lang.NullPointerExceptionCannot invoke "java.util.UUID.equals(Object)" because the return value of "wraith.fwaystones.block.WaystoneBlockEntity.getOwner()" is null at me.codexadrian.tempad.common.compat.fabricwaystones.FabricWaystoneLocationGetter.lambda$init$0(FabricWaystoneLocationGetter.java:26) ~[tempad-fabric-1.20.1-2.2.4.jar:?]

Code of Conduct

  • I have searched the issue tracker and confirmed that the issue has not been reported
  • I have checked the FAQ (if one is present) and my issue is not listed
  • I have verified that I am using the latest version of the mod
  • I have verified that I have installed all the required dependencies for the mod
  • I have verified that I do not have Optifine installed. We will close issues if we detect Optifine is in your pack. We cannot fix Optifine issues. Please do not report issues with Optifine present.
commented

Fixed in latest

commented

Ah right, I spoke with Trent about this issue, I forgot to fix it in my last release, I’ll make a release fixing it in a bit