From 19aa553b919f336c5f44e59451f52b6f679b953b Mon Sep 17 00:00:00 2001 From: Monsta Date: Sat, 8 Nov 2014 15:04:54 +0300 Subject: avoid dereferencing NULL pointers --- src/gs-manager.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/gs-manager.c b/src/gs-manager.c index 3aed12f..dc3bce5 100644 --- a/src/gs-manager.c +++ b/src/gs-manager.c @@ -449,7 +449,10 @@ gs_manager_get_lock_active (GSManager *manager, g_return_if_fail (GS_IS_MANAGER (manager)); - *lock_active = manager->priv->lock_active; + if (lock_active != NULL) + { + *lock_active = manager->priv->lock_active; + } } void @@ -483,7 +486,10 @@ gs_manager_get_lock_enabled (GSManager *manager, g_return_if_fail (GS_IS_MANAGER (manager)); - *lock_enabled = manager->priv->lock_enabled; + if (lock_enabled != NULL) + { + *lock_enabled = manager->priv->lock_enabled; + } } void -- cgit v1.2.1