do not segfault if make_cache_entry failed
Signed-off-by: Dmitry Potapov <dpotapov@gmail.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
This commit is contained in:
committed by
Shawn O. Pearce
parent
52e8370bc7
commit
048f276200
@ -206,6 +206,8 @@ static int checkout_merged(int pos, struct checkout *state)
|
||||
ce = make_cache_entry(create_ce_mode(active_cache[pos+1]->ce_mode),
|
||||
sha1,
|
||||
path, 2, 0);
|
||||
if (!ce)
|
||||
die("make_cache_entry failed for path '%s'", path);
|
||||
status = checkout_entry(ce, state, NULL);
|
||||
return status;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user