Fix: Crash when reininitializing empty generic array
Noticed this while developing new code that used GArray.
This commit is contained in:
@@ -231,7 +231,9 @@ class GArray {
|
||||
this->deallocate(new_data);
|
||||
throw;
|
||||
}
|
||||
this->deallocate(data_);
|
||||
if (this->data_) {
|
||||
this->deallocate(data_);
|
||||
}
|
||||
data_ = new_data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user