commit - ee41ec32de9bcf62dc8e21bcf6fd56cd34891273
commit + fb311a665c429d9d55ff03c54d894a847aed7ed2
blob - 083e46a194ac22629e93497fb8b2b447d8c08794
blob + 5574c9000bc724931ca486852985abafaff73d7b
--- tog/tog.c
+++ tog/tog.c
if (err)
goto done;
pid = SIMPLEQ_FIRST(&commit->parent_ids);
- err = got_object_open(&obj1, repo, pid->id);
+ if (pid) {
+ err = got_object_open(&obj1, repo,
+ pid->id);
+ if (err)
+ goto done;
+ }
got_object_commit_close(commit);
commit = NULL;
- if (err)
- goto done;
err = show_diff_view(obj1, obj2, repo);
- got_object_close(obj1);
+ if (obj1) {
+ got_object_close(obj1);
+ obj1 = NULL;
+ }
got_object_close(obj2);
- obj1 = NULL;
obj2 = NULL;
show_panel(tog_blame_view.panel);
if (err)