condemil/Gist — pull request #160 by vkzawa (2014-12-30 00:53:10+00:00)
Title: Move gist_title function call after condition

When running 'Gist: Open Gist' from the Sublime Text Command Palette I get an error:
"error: Gist: unknown error (please, report a bug!)"
The console shows a 'IndexError: list index out of range' on line 46.

This happens when a gist contains no files, which is not possible through github.com, but it IS possible with this plugin by opening a Gist and choosing 'Gist: Delete Gist File' from the Command Palette.

The proposed fix ensures gist_title is not called unless the gist has 'files'.