Skip to content

Commit

Permalink
fix: avoid NPE in CreateStoreLoader
Browse files Browse the repository at this point in the history
Passing nil into UpgradeStoreLoader results in a nil pointer exception when the upgrade handler is invoked.
  • Loading branch information
jtieri committed Jan 15, 2025
1 parent a9fcc88 commit aecdb3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion upgrade/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@
package upgrade

import (
storetypes "cosmossdk.io/store/types"
upgradetypes "cosmossdk.io/x/upgrade/types"
"github.com/cosmos/cosmos-sdk/baseapp"
)

func CreateStoreLoader(upgradeHeight int64) baseapp.StoreLoader {
return upgradetypes.UpgradeStoreLoader(upgradeHeight, nil)
return upgradetypes.UpgradeStoreLoader(upgradeHeight, &storetypes.StoreUpgrades{})
}

0 comments on commit aecdb3d

Please sign in to comment.