delete the str array in any case, although if numBytes <= 0, the array woulnd't have been allocated. CID 882.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@27736 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2008-09-25 12:06:32 +00:00
parent 0f85a3eb5b
commit d556a216cf
1 changed files with 3 additions and 3 deletions

View File

@ -1610,10 +1610,10 @@ MapView::MouseDown(BPoint point)
char *str = NULL;
int32 numBytes;
fCurrentMap->GetChars(fCurrentMouseKey, fOldKeyInfo.modifiers, fActiveDeadKey, &str, &numBytes);
if (numBytes > 0) {
if (numBytes > 0)
fTextView->FakeKeyDown(str, numBytes);
delete[] str;
}
delete[] str;
SetTracking(true);
SetMouseEventMask(B_POINTER_EVENTS,
B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY);