Fixed two segfaults in code editor and debugger

How to reproduce the two issues:

1. Simply write a single closed parenthesis (e.g. `)` or `}`) as the only thing in the _Data_ input field.
2. Debug any contract (even just a single trivial `stop` suffices). Go past the last step (i.e. _EXIT_ status). Hit F10 to try and go forward.