[libgit2-glib/wip/development: 13/14] Fix walk_callback_wrapper
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib/wip/development: 13/14] Fix walk_callback_wrapper
- Date: Sat, 26 Apr 2014 19:51:24 +0000 (UTC)
commit 682e5f237f0ead080a2a2e36bf2cefd0f1926f54
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat Apr 26 21:45:20 2014 +0200
Fix walk_callback_wrapper
libgit2-glib/ggit-tree.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/libgit2-glib/ggit-tree.c b/libgit2-glib/ggit-tree.c
index 7b6250e..cfeb66e 100644
--- a/libgit2-glib/ggit-tree.c
+++ b/libgit2-glib/ggit-tree.c
@@ -214,12 +214,17 @@ walk_callback_wrapper (const char *root,
gint ret;
GgitTreeEntry *wentry;
WalkInfo *info = (WalkInfo *)payload;
+ git_tree_entry *dest;
- wentry = _ggit_tree_entry_wrap (git_tree_entry_dup(entry), TRUE);
+ ret = git_tree_entry_dup (&dest, entry);
+ if (ret == GIT_OK)
+ {
+ wentry = _ggit_tree_entry_wrap (dest, TRUE);
- ret = info->callback(root, wentry, info->user_data);
+ ret = info->callback(root, wentry, info->user_data);
- ggit_tree_entry_unref (wentry);
+ ggit_tree_entry_unref (wentry);
+ }
return ret;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]