diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2019-02-22 19:58:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-22 19:58:54 +0100 |
commit | 67616251550d50266def27d426697c3c79bc6a92 (patch) | |
tree | d66d46b44bf5557c6c6f205fb3baa9e025149bef /core | |
parent | aef5b36bfaf6b379ddeb4809312c1fc465f35779 (diff) | |
parent | 4f49d09272d4885629bdde484edea875d9b45c94 (diff) |
Merge pull request #26165 from hpvb/fix-parse-utf8
Don't crash when parse_utf8 receives a NULL pointer
Diffstat (limited to 'core')
-rw-r--r-- | core/ustring.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index b9914fb530..ff8fcaaaaf 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -1359,6 +1359,9 @@ bool String::parse_utf8(const char *p_utf8, int p_len) { #define _UNICERROR(m_err) print_line("Unicode error: " + String(m_err)); + if (!p_utf8) + return true; + String aux; int cstr_size = 0; |