frontend/history.c: Prevent possible null dereference of hist
Merge pull request #804 from lioncash/null-deref

frontend/history.c: Prevent possible null dereference of hist