Fix crash on empty editor.
Merge pull request #10 from jdfreder/empty_fix

Fix crash on empty editor.