From 3a6420f378bce074d55721ed0c13c97fa9f088c7 Mon Sep 17 00:00:00 2001 From: Rick Bradley Date: Tue, 18 Dec 2012 17:46:18 -0600 Subject: [PATCH] don't deref before we've asserted just sayin'. --- src/reflog.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/reflog.c b/src/reflog.c index df799b113..275622997 100644 --- a/src/reflog.c +++ b/src/reflog.c @@ -208,10 +208,10 @@ int git_reflog_read(git_reflog **reflog, const git_reference *ref) git_buf log_file = GIT_BUF_INIT; git_reflog *log = NULL; - *reflog = NULL; - assert(reflog && ref); + *reflog = NULL; + if (reflog_init(&log, ref) < 0) return -1;