From da2ff102238e5d9ae4f634f89f6a1425ef99770d Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Mon, 13 Apr 2026 20:03:25 +0200 Subject: [PATCH] Warn on null pointer in callback in Font.cpp --- libraries/render-utils/src/text/Font.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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; }