[gitg] Added extra check for NULL on current ref
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: svn-commits-list gnome org
- Subject: [gitg] Added extra check for NULL on current ref
- Date: Sun, 5 Apr 2009 11:03:31 -0400 (EDT)
commit 332d4e844f3cd334c601f2f5c69bfcc205786908
Author: Jesse van den Kieboom <jesse icecrew nl>
Date: Sun Apr 5 17:03:13 2009 +0200
Added extra check for NULL on current ref
---
gitg/gitg-repository.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/gitg/gitg-repository.c b/gitg/gitg-repository.c
index e99cecc..4c9ef16 100644
--- a/gitg/gitg-repository.c
+++ b/gitg/gitg-repository.c
@@ -762,7 +762,7 @@ load_refs(GitgRepository *self)
{
GitgRef *ref = add_ref(self, components[1], components[0]);
- if (strncmp(components[1], current, strlen(current)) == 0)
+ if (current != NULL && strncmp(components[1], current, strlen(current)) == 0)
self->priv->current_ref = gitg_ref_copy(ref);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]