mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-26 07:54:36 +00:00
memcpy source can't be null.
This commit is contained in:
parent
608cb912a1
commit
556e085f2c
@ -127,8 +127,11 @@ private:
|
|||||||
m_capacity *= 2;
|
m_capacity *= 2;
|
||||||
}
|
}
|
||||||
T* ptr = new T[m_capacity];
|
T* ptr = new T[m_capacity];
|
||||||
memcpy( ptr, m_ptr, m_size * sizeof( T ) );
|
if( m_size != 0 )
|
||||||
delete[] m_ptr;
|
{
|
||||||
|
memcpy( ptr, m_ptr, m_size * sizeof( T ) );
|
||||||
|
delete[] m_ptr;
|
||||||
|
}
|
||||||
m_ptr = ptr;
|
m_ptr = ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user