Skip to content

Commit

Permalink
Prevent NPE in DEV UI JsonRpc#route method
Browse files Browse the repository at this point in the history
  • Loading branch information
michalvavrik committed Jun 5, 2023
1 parent 947d3a9 commit 36efb92
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ private void route(JsonRpcRequest jsonRpcRequest, ServerWebSocket s) {
}
uni.subscribe()
.with(item -> {
if (JsonRpcMessage.class.isAssignableFrom(item.getClass())) {
if (item != null && JsonRpcMessage.class.isAssignableFrom(item.getClass())) {
JsonRpcMessage jsonRpcMessage = (JsonRpcMessage) item;
codec.writeResponse(s, jsonRpcRequest.getId(), jsonRpcMessage.getResponse(),
jsonRpcMessage.getMessageType());
Expand Down

0 comments on commit 36efb92

Please sign in to comment.