aboutsummaryrefslogtreecommitdiff
path: root/common/str.h
diff options
context:
space:
mode:
Diffstat (limited to 'common/str.h')
-rw-r--r--common/str.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/str.h b/common/str.h
index a4570bead8..2c18c75554 100644
--- a/common/str.h
+++ b/common/str.h
@@ -66,7 +66,7 @@ public:
return _str[idx];
}
- const char *c_str() const { return _str; }
+ const char *c_str() const { return _str ? _str : ""; }
int size() const { return _len; }
bool isEmpty() const { return (_len == 0); }