Fix: Crash when reininitializing empty generic array

Noticed this while developing new code that used GArray.
This commit is contained in:
2022-10-04 22:11:02 -05:00
parent b804f925c7
commit fbbd7f0d5c
2 changed files with 12 additions and 1 deletions

View File

@@ -231,7 +231,9 @@ class GArray {
this->deallocate(new_data);
throw;
}
this->deallocate(data_);
if (this->data_) {
this->deallocate(data_);
}
data_ = new_data;
}