From ba86e9594c8ab6c080b673857712ca5484886033 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 26 Nov 2022 11:14:25 +0200 Subject: [PATCH] return if ubrk_safeClone() fails in QTextBoundaryFinder assignment operator Signed-off-by: Ivailo Monev --- src/core/tools/qtextboundaryfinder.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/tools/qtextboundaryfinder.cpp b/src/core/tools/qtextboundaryfinder.cpp index 18aaf49eb..ced110f62 100644 --- a/src/core/tools/qtextboundaryfinder.cpp +++ b/src/core/tools/qtextboundaryfinder.cpp @@ -194,6 +194,7 @@ QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &o if (Q_UNLIKELY(U_FAILURE(error))) { qWarning("QTextBoundaryFinder: ubrk_safeClone() failed %s", u_errorName(error)); d->breakiter = nullptr; + return *this; } error = U_ZERO_ERROR; ubrk_setText(d->breakiter, reinterpret_cast(d->string.unicode()), d->string.size(), &error); -- 2.11.0