diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-02-12 08:13:32 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-02-12 08:13:32 +0100 |
| commit | ae8a0059300244e9cd12e14254ce5317da96a2ad (patch) | |
| tree | 3d818aa12dd380765563abd932312e1619d6ca4c /unity-shared | |
| parent | 91724572d24b9196e0453a7ae6678f692053ba11 (diff) | |
Introspectable: don't try to add or remove an invalid child
(bzr r3652.3.5)
Diffstat (limited to 'unity-shared')
| -rw-r--r-- | unity-shared/Introspectable.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/unity-shared/Introspectable.cpp b/unity-shared/Introspectable.cpp index 611df518b..e6aa0a402 100644 --- a/unity-shared/Introspectable.cpp +++ b/unity-shared/Introspectable.cpp @@ -81,12 +81,18 @@ GVariant* Introspectable::Introspect() void Introspectable::AddChild(Introspectable* child) { + if (!child) + return; + children_.push_back(child); child->parents_.push_back(this); } void Introspectable::RemoveChild(Introspectable* child) { + if (!child) + return; + children_.remove(child); child->parents_.remove(this); } |
