Skip to content

Commit

Permalink
Protect against nullptr
Browse files Browse the repository at this point in the history
  • Loading branch information
flodnv committed Jan 16, 2025
1 parent a457f09 commit 4a1382c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BedrockServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1046,7 +1046,7 @@ void BedrockServer::runCommand(unique_ptr<BedrockCommand>&& _command, bool isBlo
// the previous commit, the chances are very low that we'll choose the same journal, thus, we
// don't need to lock our next commit on this page conflict.
// Plugins may define other tables on which we should not lock our next commit.
if (!SStartsWith(lastConflictTable, "journal") && command->getPlugin()->shouldLockCommitPageOnTableConflict(lastConflictTable)) {
if (!SStartsWith(lastConflictTable, "journal") && (command->getPlugin() == nullptr || command->getPlugin()->shouldLockCommitPageOnTableConflict(lastConflictTable))) {
lastConflictPage = db.getLastConflictPage();
}
}
Expand Down

0 comments on commit 4a1382c

Please sign in to comment.