UndoBuffer.cpp: Fix PVS 471

Fix 'fTypedText' is assigned values twice successively.

Change-Id: Ibadf2fced0f448441e541293d04b86bc14909c35
Reviewed-on: https://review.haiku-os.org/729
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
Murai Takashi 2018-11-19 08:37:02 +09:00 committed by Jérôme Duval
parent bf98f7960d
commit a9002af95e

View File

@ -271,7 +271,6 @@ BTextView::TypingUndoBuffer::UndoSelf(BClipboard* clipboard)
int32 len = fTypedEnd - fTypedStart;
free(fTypedText);
fTypedText = NULL;
fTypedText = (char*)malloc(len);
memcpy(fTypedText, fTextView->Text() + fTypedStart, len);