geforkt von Mirrors/Paper
Fix NPE race condition in ServerListPingEvent
Fixes GH-1473 If a ping is responded to prior to the server sample being populated (pre-tick as an example) it can result in an NPE.
Dieser Commit ist enthalten in:
Ursprung
1b44fd3c1b
Commit
116a24f8b0
@ -91,7 +91,7 @@ index 0000000000..350410527b
|
|||||||
+
|
+
|
||||||
+ private StandardPaperServerListPingEventImpl(MinecraftServer server, NetworkManager networkManager, ServerPing ping) {
|
+ private StandardPaperServerListPingEventImpl(MinecraftServer server, NetworkManager networkManager, ServerPing ping) {
|
||||||
+ super(server, new PaperStatusClient(networkManager), ping.getServerData().getProtocolVersion(), server.server.getServerIcon());
|
+ super(server, new PaperStatusClient(networkManager), ping.getServerData().getProtocolVersion(), server.server.getServerIcon());
|
||||||
+ this.originalSample = ping.getPlayers().getSample();
|
+ this.originalSample = ping.getPlayers() == null ? null : ping.getPlayers().getSample(); // GH-1473 - pre-tick race condition NPE
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Nonnull
|
+ @Nonnull
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren