aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/corelib/parser/qmlerror.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/corelib/parser/qmlerror.cpp')
-rw-r--r--src/lib/corelib/parser/qmlerror.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/corelib/parser/qmlerror.cpp b/src/lib/corelib/parser/qmlerror.cpp
index 157d1690f..d9fbdd703 100644
--- a/src/lib/corelib/parser/qmlerror.cpp
+++ b/src/lib/corelib/parser/qmlerror.cpp
@@ -114,6 +114,9 @@ QmlError::QmlError(const QmlError &other)
*/
QmlError &QmlError::operator=(const QmlError &other)
{
+ if (this == &other) // Self assignment guard.
+ return *this;
+
if (!other.d) {
delete d;
d = nullptr;