[libgit2-glib] ggit-branch-enumerator.c: Check for NULL enumerator in ggit_branch_enumerator_ref
- From: Igor Gnatenko <ignatenko src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgit2-glib] ggit-branch-enumerator.c: Check for NULL enumerator in ggit_branch_enumerator_ref
- Date: Fri, 1 Sep 2017 06:08:32 +0000 (UTC)
commit a74811f28260f7d05e9bda74889b7f5c681bd1a4
Author: Brian C. Lane <bcl redhat com>
Date: Wed Aug 30 11:22:22 2017 -0700
ggit-branch-enumerator.c: Check for NULL enumerator in ggit_branch_enumerator_ref
And adjust return annotation.
libgit2-glib/ggit-branch-enumerator.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/libgit2-glib/ggit-branch-enumerator.c b/libgit2-glib/ggit-branch-enumerator.c
index 1b87dc0..b127f53 100644
--- a/libgit2-glib/ggit-branch-enumerator.c
+++ b/libgit2-glib/ggit-branch-enumerator.c
@@ -32,6 +32,8 @@ _ggit_branch_enumerator_wrap (git_branch_iterator *iter)
GgitBranchEnumerator *
ggit_branch_enumerator_ref (GgitBranchEnumerator *enumerator)
{
+ g_return_val_if_fail (enumerator != NULL, NULL);
+
g_atomic_int_inc (&enumerator->ref_count);
return enumerator;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]