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:
@@ -1610,10 +1610,10 @@ MapView::MouseDown(BPoint point)
|
|||||||
char *str = NULL;
|
char *str = NULL;
|
||||||
int32 numBytes;
|
int32 numBytes;
|
||||||
fCurrentMap->GetChars(fCurrentMouseKey, fOldKeyInfo.modifiers, fActiveDeadKey, &str, &numBytes);
|
fCurrentMap->GetChars(fCurrentMouseKey, fOldKeyInfo.modifiers, fActiveDeadKey, &str, &numBytes);
|
||||||
if (numBytes > 0) {
|
if (numBytes > 0)
|
||||||
fTextView->FakeKeyDown(str, numBytes);
|
fTextView->FakeKeyDown(str, numBytes);
|
||||||
|
|
||||||
delete[] str;
|
delete[] str;
|
||||||
}
|
|
||||||
SetTracking(true);
|
SetTracking(true);
|
||||||
SetMouseEventMask(B_POINTER_EVENTS,
|
SetMouseEventMask(B_POINTER_EVENTS,
|
||||||
B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY);
|
B_LOCK_WINDOW_FOCUS | B_NO_POINTER_HISTORY);
|
||||||
|
|||||||
Reference in New Issue
Block a user