Skip to content

Commit 414668d

Browse files
committed
fix: nil pointer panic in FinalizeBlock
1 parent 4d47461 commit 414668d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i
5353
### Bug Fixes
5454

5555
* (x/auth) [#23741](https://github.com/cosmos/cosmos-sdk/pull/23741) Support legacy global AccountNumber.
56+
* (baseapp) [#]() Fix nil pointer panic in FinalizeBlock.
5657

5758
### Removed
5859

baseapp/abci.go

+4
Original file line numberDiff line numberDiff line change
@@ -903,6 +903,10 @@ func (app *BaseApp) internalFinalizeBlock(ctx context.Context, req *abci.Finaliz
903903
// where they adhere to the sdk.Tx interface.
904904
func (app *BaseApp) FinalizeBlock(req *abci.FinalizeBlockRequest) (res *abci.FinalizeBlockResponse, err error) {
905905
defer func() {
906+
if res == nil {
907+
return
908+
}
909+
906910
// call the streaming service hooks with the FinalizeBlock messages
907911
for _, streamingListener := range app.streamingManager.ABCIListeners {
908912
if streamErr := streamingListener.ListenFinalizeBlock(app.finalizeBlockState.Context(), *req, *res); streamErr != nil {

0 commit comments

Comments
 (0)