aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-24 12:50:25 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-24 12:50:25 -0400
commit7b0620547a3a42c3aefa926312cc9d06b87e817c (patch)
tree17e3f8825fc874284e8b1ca437ad8df578f47a77
parentedad4063970e74ac826c5a01c09e9c3917eca40f (diff)
downloadqmenumodel-7b0620547a3a42c3aefa926312cc9d06b87e817c.tar.gz
qmenumodel-7b0620547a3a42c3aefa926312cc9d06b87e817c.tar.bz2
qmenumodel-7b0620547a3a42c3aefa926312cc9d06b87e817c.zip
unitymenumodel: use g_clear_object
-rw-r--r--libqmenumodel/src/unitymenumodel.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp
index 4507c29..525e115 100644
--- a/libqmenumodel/src/unitymenumodel.cpp
+++ b/libqmenumodel/src/unitymenumodel.cpp
@@ -96,12 +96,8 @@ UnityMenuModelPrivate::~UnityMenuModelPrivate()
{
this->clearItems(false);
- if (this->menutracker)
- gtk_menu_tracker_free (this->menutracker);
-
- if (this->muxer)
- g_object_unref (this->muxer);
-
+ g_clear_pointer (&this->menutracker, gtk_menu_tracker_free);
+ g_clear_object (&this->muxer);
g_clear_object (&this->connection);
if (this->nameWatchId)