diff options
author | Ben Straub <bs@github.com> | 2014-02-05 14:05:18 -0800 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2014-02-05 14:05:18 -0800 |
commit | 3094102f694cc7bdbe3572a35050fec3729b2870 (patch) | |
tree | 28ad52bd1d75bbcfe44eb36c4d06b539f2dadfd2 /tests | |
parent | fe45922d77d45b84af9701a3915155299ac85d63 (diff) | |
download | libgit2-3094102f694cc7bdbe3572a35050fec3729b2870.tar.gz |
Avoid crash when skipping remote test
Diffstat (limited to 'tests')
-rw-r--r-- | tests/online/push.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/online/push.c b/tests/online/push.c index 9f85ab419..55b97b282 100644 --- a/tests/online/push.c +++ b/tests/online/push.c @@ -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); } |