mirror of https://github.com/bkaradzic/bgfx
Fix bad delete in font_manager.cpp (#2703)
Fix alloc-dealloc-mismatch (operator new [] vs operator delete
This commit is contained in:
parent
af68e138fe
commit
5b4a6dc330
|
@ -284,7 +284,7 @@ TrueTypeHandle FontManager::createTtf(const uint8_t* _buffer, uint32_t _size)
|
|||
void FontManager::destroyTtf(TrueTypeHandle _handle)
|
||||
{
|
||||
BX_ASSERT(isValid(_handle), "Invalid handle used");
|
||||
delete m_cachedFiles[_handle.idx].buffer;
|
||||
delete[] m_cachedFiles[_handle.idx].buffer;
|
||||
m_cachedFiles[_handle.idx].bufferSize = 0;
|
||||
m_cachedFiles[_handle.idx].buffer = NULL;
|
||||
m_filesHandles.free(_handle.idx);
|
||||
|
|
Loading…
Reference in New Issue