diff --git a/src/common/main.c b/src/common/main.c index b9db34e..0c96e00 100644 --- a/src/common/main.c +++ b/src/common/main.c @@ -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")); diff --git a/src/common/sheet.c b/src/common/sheet.c index cbe3d14..f3f5dd8 100644 --- a/src/common/sheet.c +++ b/src/common/sheet.c @@ -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;