]> git.proxmox.com Git - libgit2.git/commitdiff
Avoid crash when skipping remote test
authorBen Straub <bs@github.com>
Wed, 5 Feb 2014 22:05:18 +0000 (14:05 -0800)
committerBen Straub <bs@github.com>
Wed, 5 Feb 2014 22:05:18 +0000 (14:05 -0800)
tests/online/push.c

index 9f85ab41973e4469d7ff6b5f1e68652c1a38f845..55b97b28259f1a91b142d23f61250f9c0a83e710 100644 (file)
@@ -562,8 +562,10 @@ void test_online_push__multi(void)
 
        cl_git_pass(git_reflog_read(&log, _repo, "refs/remotes/test/b1"));
        entry = git_reflog_entry_byindex(log, 0);
-       cl_assert_equal_s("test push", git_reflog_entry_message(entry));
-       cl_assert_equal_s("foo@example.com", git_reflog_entry_committer(entry)->email);
+       if (entry) {
+               cl_assert_equal_s("test push", git_reflog_entry_message(entry));
+               cl_assert_equal_s("foo@example.com", git_reflog_entry_committer(entry)->email);
+       }
 
        git_reflog_free(log);
 }