[bijiben] manager : get item path => handle null



commit 946209d366a638cf0fbd4564f200869a00f8b516
Author: Pierre-Yves Luyten <py luyten fr>
Date:   Sun Sep 20 09:27:45 2015 +0200

    manager : get item path => handle null

 src/libbiji/biji-manager.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/libbiji/biji-manager.c b/src/libbiji/biji-manager.c
index 46a41ab..2e074f5 100644
--- a/src/libbiji/biji-manager.c
+++ b/src/libbiji/biji-manager.c
@@ -765,6 +765,10 @@ BijiItem *
 biji_manager_get_item_at_path (BijiManager *manager, const gchar *path)
 {
   BijiItem *retval;
+  g_return_val_if_fail (BIJI_IS_MANAGER(manager), NULL);
+
+  if (path == NULL)
+    return NULL;
 
   retval = g_hash_table_lookup (manager->priv->items, (gconstpointer) path);
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]