ruby: fixed data block assignment fix

Fixed data block assignment to not delete if not internally allocated.
This commit is contained in:
Brad Beckmann 2010-02-10 16:40:54 -08:00
parent 714865e4a4
commit 64999b4343

View file

@ -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;
}