When BString assignment operator is called with a NULL argument we should use an empty string instead. I checked this against Dano.

This fixed #4713


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34983 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval 2010-01-09 23:06:30 +00:00
parent 9b79c5cc28
commit 534bebec39
1 changed files with 3 additions and 1 deletions

View File

@ -297,7 +297,9 @@ BString::operator=(const BString& string)
BString&
BString::operator=(const char* string)
{
if (string && string != String())
if (!string)
string = "";
if (string != String())
SetTo(string, strlen(string));
return *this;
}