Fix crash with empty file
Merge pull request #187 from sinkuu/fix_crash_emptyfile

Fix crash with empty file