Skip to content

Commit

Permalink
Also fix Lst<Mixed>::clear()
Browse files Browse the repository at this point in the history
  • Loading branch information
jedelbo committed Jun 18, 2024
1 parent b62ce85 commit be5fdae
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/realm/list.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -503,10 +503,11 @@ void Lst<Mixed>::remove(size_t from, size_t to)

void Lst<Mixed>::clear()
{
if (size() > 0) {
if (Replication* repl = Base::get_replication()) {
repl->list_clear(*this);
}
auto sz = size();
if (Replication* repl = Base::get_replication()) {
repl->list_clear(*this);
}
if (sz > 0) {
CascadeState state;
bool recurse = remove_backlinks(state);

Expand Down

0 comments on commit be5fdae

Please sign in to comment.