ruby: fixed data block assignment fix
Fixed data block assignment to not delete if not internally allocated.
This commit is contained in:
parent
714865e4a4
commit
64999b4343
1 changed files with 3 additions and 1 deletions
|
@ -82,7 +82,9 @@ bool operator==(const DataBlock& obj1, const DataBlock& obj2);
|
|||
inline
|
||||
void DataBlock::assign(uint8* data)
|
||||
{
|
||||
if (m_alloc) {
|
||||
delete [] m_data;
|
||||
}
|
||||
m_data = data;
|
||||
m_alloc = false;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue