Prevent some near-startup coredumps.

Fixes #38.
This commit is contained in:
Glen Whitney 2019-07-27 23:54:16 -04:00
parent 39c12c08e0
commit 2a4071f8dc
2 changed files with 2 additions and 1 deletions

View File

@ -330,7 +330,7 @@ static void do_attribute(Sheet *cursheet, Key action)
adj = LEFT;
do_mark(cursheet, GET_MARK_CUR);
onecell = SAME_LOC(cursheet->mark1, cursheet->mark2);
fcell = CELL_AT(cursheet, cursheet->mark1);
fcell = safe_cell_at(cursheet, cursheet->mark1);
if (action != ADJUST_LOCK && onecell && locked(fcell))
{
line_msg(_("Cell attribute:"),_("Cell is locked"));

View File

@ -446,6 +446,7 @@ void forceupdate(Sheet *sheet)
Cell *cell;
assert(sheet!=(Sheet*)0);
if (sheet->sheet == (Cell **)0) return;
for (ALL_CELLS_IN_SHEET(sheet,i,cell))
if (cell != NULLCELL)
cell->updated = cell->clock_t0 = cell->clock_t1 = cell->clock_t2 = 0;