Skip to content

Commit 4a1382c

Browse files
committed
Protect against nullptr
1 parent a457f09 commit 4a1382c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BedrockServer.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1046,7 +1046,7 @@ void BedrockServer::runCommand(unique_ptr<BedrockCommand>&& _command, bool isBlo
10461046
// the previous commit, the chances are very low that we'll choose the same journal, thus, we
10471047
// don't need to lock our next commit on this page conflict.
10481048
// Plugins may define other tables on which we should not lock our next commit.
1049-
if (!SStartsWith(lastConflictTable, "journal") && command->getPlugin()->shouldLockCommitPageOnTableConflict(lastConflictTable)) {
1049+
if (!SStartsWith(lastConflictTable, "journal") && (command->getPlugin() == nullptr || command->getPlugin()->shouldLockCommitPageOnTableConflict(lastConflictTable))) {
10501050
lastConflictPage = db.getLastConflictPage();
10511051
}
10521052
}

0 commit comments

Comments
 (0)