check if cur_frame is NULL
Merge pull request #61 from dagurval/crash-on-input

check if cur_frame is NULL