• R/O
  • HTTP
  • SSH
  • HTTPS

Katie: Commit

C++ toolkit derived from the Qt 4.8 framework


Commit MetaInfo

Revisiona6ff51bb74c94eaca6a4b7a2dc4eb36e26002a38 (tree)
Time2022-11-26 15:34:03
AuthorIvailo Monev <xakepa10@gmai...>
CommiterIvailo Monev

Log Message

check for self-assignment in QTextBoundaryFinder assignment operator

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>

Change Summary

Incremental Difference

--- a/src/core/tools/qtextboundaryfinder.cpp
+++ b/src/core/tools/qtextboundaryfinder.cpp
@@ -177,6 +177,10 @@ QTextBoundaryFinder::QTextBoundaryFinder(const QTextBoundaryFinder &other)
177177 */
178178 QTextBoundaryFinder &QTextBoundaryFinder::operator=(const QTextBoundaryFinder &other)
179179 {
180+ if (d == other.d) {
181+ return *this;
182+ }
183+
180184 d->type = other.d->type;
181185 d->pos = other.d->pos;
182186 d->string = other.d->string;
Show on old repository browser