diff --git a/libraries/render-utils/src/text/Font.cpp b/libraries/render-utils/src/text/Font.cpp index 6fcdffbfc21..710a3f63e1b 100644 --- a/libraries/render-utils/src/text/Font.cpp +++ b/libraries/render-utils/src/text/Font.cpp @@ -103,6 +103,11 @@ void Font::handleFontNetworkReply() { QThreadStorage _readOffset; QThreadStorage _readMax; int readHelper(void* dst, int length, void* data) { + if (!dst) { + qWarning() << "readHelper called with NULL pointer as first argument: dst = " << dst << "; length = " << length << "; data =" << data; + return 0; + } + if (_readOffset.localData() + length > _readMax.localData()) { return -1; }