Initializing the pointers to NULL is always a good idea. Fixes bug #5159.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34722 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stefano Ceccherini 2009-12-20 15:54:09 +00:00
parent 0b58d8440c
commit 5674af6f76
1 changed files with 2 additions and 1 deletions

View File

@ -291,6 +291,7 @@ TermView::_InitObject(int32 argc, const char** argv)
fTextBuffer = NULL;
fVisibleTextBuffer = NULL;
fScrollBar = NULL;
fInline = NULL;
fTextForeColor = kBlackColor;
fTextBackColor = kWhiteColor;
fCursorForeColor = kWhiteColor;
@ -2810,7 +2811,7 @@ TermView::DisableResizeView(int32 disableCount)
void
TermView::_DrawInlineMethodString()
{
if (!fInline->String())
if (!fInline || !fInline->String())
return;
const int32 numChars = BString(fInline->String()).CountChars();