summaryrefslogtreecommitdiff
path: root/src/utils/stringutils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/stringutils.cpp')
-rw-r--r--src/utils/stringutils.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils/stringutils.cpp b/src/utils/stringutils.cpp
index b6251a378..3e067fe5c 100644
--- a/src/utils/stringutils.cpp
+++ b/src/utils/stringutils.cpp
@@ -294,6 +294,8 @@ const char* getSafeUtf8String(const std::string &text)
void getSafeUtf8String(std::string text, char *const buf)
{
+ if (!buf)
+ return;
const size_t sz = text.size();
const size_t size = sz + UTF8_MAX_SIZE;
if (size > 65500)