Skip to content

Commit 5e37fa5

Browse files
committed
Critical double Clear() fix
1 parent fb03aa5 commit 5e37fa5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

source/blocks/Block/Block-Remove.inl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,10 @@ namespace Langulus::Anyness
252252
if (mEntry->GetUses() == 1) {
253253
// Entry is used only in this block, so it's safe to
254254
// destroy all elements. We will reuse the entry and type
255-
FreeInner();
256-
mCount = 0;
255+
if (mCount) {
256+
FreeInner();
257+
mCount = 0;
258+
}
257259
}
258260
else {
259261
// If reached, then data is referenced from multiple places

0 commit comments

Comments
 (0)