fix: crash on forward with empty location_history
This commit is contained in:
parent
d00e76f3ab
commit
9343244037
1 changed files with 2 additions and 2 deletions
|
@ -119,8 +119,8 @@ const Process = struct {
|
||||||
|
|
||||||
fn forward(self: *Process, from: tp.pid_ref, cb_addr: usize) void {
|
fn forward(self: *Process, from: tp.pid_ref, cb_addr: usize) void {
|
||||||
const cb: *CallBack = if (cb_addr == 0) return else @ptrFromInt(cb_addr);
|
const cb: *CallBack = if (cb_addr == 0) return else @ptrFromInt(cb_addr);
|
||||||
if (self.pos == self.records.items.len - 1)
|
if (self.records.items.len == 0) return;
|
||||||
return;
|
if (self.pos == self.records.items.len - 1) return;
|
||||||
self.pos += 1;
|
self.pos += 1;
|
||||||
const entry = self.records.items[self.pos];
|
const entry = self.records.items[self.pos];
|
||||||
cb(from, entry.cursor, entry.selection);
|
cb(from, entry.cursor, entry.selection);
|
||||||
|
|
Loading…
Add table
Reference in a new issue