summaryrefslogtreecommitdiffstats
path: root/WebCore/platform/text/String.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/platform/text/String.cpp')
-rw-r--r--WebCore/platform/text/String.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/WebCore/platform/text/String.cpp b/WebCore/platform/text/String.cpp
index 44582a9..24659a4 100644
--- a/WebCore/platform/text/String.cpp
+++ b/WebCore/platform/text/String.cpp
@@ -81,6 +81,9 @@ String::String(const char* str, unsigned length)
void String::append(const String& str)
{
+ if (str.isEmpty())
+ return;
+
// FIXME: This is extremely inefficient. So much so that we might want to take this
// out of String's API. We can make it better by optimizing the case where exactly
// one String is pointing at this StringImpl, but even then it's going to require a