Skip to content

Commit

Permalink
do not checkpoint outside of paused sandbox mode
Browse files Browse the repository at this point in the history
  • Loading branch information
griffi-gh committed Oct 16, 2024
1 parent 2a77e40 commit c43d873
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/src/gundo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,14 @@ void* undo_stack::snapshot_state() {
}

void undo_stack::checkpoint(const char *reason, void *snapshot /* = nullptr */) {
if (!W->paused) {
tms_warnf("undo_checkpoint: SKIPPING, BECAUSE not paused");
return;
} else if (!G->state.sandbox) {
tms_warnf("undo_checkpoint: SKIPPING, BECAUSE state != sandbox");
return;
}

#ifdef DEBUG
auto started = std::chrono::high_resolution_clock::now();
#endif
Expand Down

0 comments on commit c43d873

Please sign in to comment.