BTextView::FreeRunArray() now accepts a NULL pointer too (like free())

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19937 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2007-01-24 06:02:58 +00:00
parent 113af0e68f
commit 1a64df767e

View File

@ -2506,6 +2506,9 @@ BTextView::CopyRunArray(const text_run_array *orig, int32 countDelta)
void
BTextView::FreeRunArray(text_run_array *array)
{
if (array == NULL)
return;
// Call destructors explicitly
for (int32 i = 0; i < array->count; i++)
array->runs[i].font.~BFont();