DrawString() no longer crashes when called with a NULL string.
This fixes bug #136. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16412 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
35e74831d4
commit
48e3cfa354
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2001-2005, Haiku.
|
||||
* Copyright 2001-2006, Haiku.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Authors:
|
||||
@ -2316,6 +2316,9 @@ BView::DrawChar(char c, BPoint location)
|
||||
void
|
||||
BView::DrawString(const char *string, escapement_delta *delta)
|
||||
{
|
||||
if (string == NULL)
|
||||
return;
|
||||
|
||||
DrawString(string, strlen(string), PenLocation(), delta);
|
||||
}
|
||||
|
||||
@ -2323,6 +2326,9 @@ BView::DrawString(const char *string, escapement_delta *delta)
|
||||
void
|
||||
BView::DrawString(const char *string, BPoint location, escapement_delta *delta)
|
||||
{
|
||||
if (string == NULL)
|
||||
return;
|
||||
|
||||
DrawString(string, strlen(string), location, delta);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user