Skip to content

Commit

Permalink
Use correct method to delete resource (#783)
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiolo authored Dec 11, 2024
1 parent 9fe088a commit 81e74a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/cell.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ struct Cell {
}

void Clear() {
grid.release();
grid.reset();
text.t.Clear();
text.image = nullptr;
Reset();
Expand Down
4 changes: 2 additions & 2 deletions src/grid.h
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ struct Grid {
}
if (!cell->parent) return; // FIXME: deletion of root cell, what would be better?
s = cell->parent->grid->FindCell(cell);
cell->grid.release();
cell->grid.reset();
}

void InsertCells(int dx, int dy, int nxs, int nys, Cell *nc = nullptr) {
Expand Down Expand Up @@ -668,7 +668,7 @@ struct Grid {
}

void MergeWithParent(Grid *p, Selection &s, Document *doc) {
cell->grid = nullptr;
cell->grid.release();
foreachcell(c) {
if (x + s.x >= p->xs) p->InsertCells(p->xs, -1, 1, 0);
if (y + s.y >= p->ys) p->InsertCells(-1, p->ys, 0, 1);
Expand Down

0 comments on commit 81e74a0

Please sign in to comment.