[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [kdepimlibs] akonadi/src/core: Fix crash when copying TagPrivate with null parent
From:       Dan_Vrátil <dvratil () redhat ! com>
Date:       2015-09-23 15:23:07
Message-ID: E1Zelsx-0003gj-Uk () scm ! kde ! org
[Download RAW message or body]

Git commit 5552270831e68c0afc7f8e77dd7e5c0bced1e09b by Dan Vrátil.
Committed on 23/09/2015 at 15:22.
Pushed by dvratil into branch 'master'.

Fix crash when copying TagPrivate with null parent

M  +3    -1    akonadi/src/core/tag_p.h

http://commits.kde.org/kdepimlibs/5552270831e68c0afc7f8e77dd7e5c0bced1e09b

diff --git a/akonadi/src/core/tag_p.h b/akonadi/src/core/tag_p.h
index dac185c..c4cc29b 100644
--- a/akonadi/src/core/tag_p.h
+++ b/akonadi/src/core/tag_p.h
@@ -40,7 +40,9 @@ public:
         id = other.id;
         gid = other.gid;
         remoteId = other.remoteId;
-        parent.reset(new Tag(*other.parent));
+        if (other.parent) {
+            parent.reset(new Tag(*other.parent));
+        }
         type = other.type;
         Q_FOREACH (Attribute *attr, other.mAttributes) {
             mAttributes.insert(attr->type(), attr->clone());
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic