summaryrefslogtreecommitdiff
path: root/src/replica.zig
diff options
context:
space:
mode:
Diffstat (limited to 'src/replica.zig')
-rw-r--r--src/replica.zig5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/replica.zig b/src/replica.zig
index e104391f..f58a4b27 100644
--- a/src/replica.zig
+++ b/src/replica.zig
@@ -692,7 +692,7 @@ pub const Replica = struct {
for (&r.screens) |*slot| if (slot.*) |*sc| sc.rep.deinit(terminal.emulator_gpa);
if (r.t.core) |c| {
const was = Stepping.begin(&r.t, &r.epoch);
- if (r.copy.held) r.copy.restore();
+ if (r.copy.held) _ = r.copy.restore();
c.deinit();
was.end();
}
@@ -872,8 +872,9 @@ pub const Replica = struct {
fn toConfirmed(r: *Replica) void {
const held = r.copy.held;
if (held) {
- r.copy.restore();
+ const whole = r.copy.restore();
rollback.Epoch.select(null);
+ if (!whole) return r.fail("out of memory for a rollback");
// The rows a terminal was read as are no copy's: what the
// speculation built was the epoch's, freed with it, and what
// was there before is of a grid the deltas since moved on