Your patch does not address the problem you describe. If get_current_editorset() returns None, then the code will die much earlier, on the line immediately after the call to that function, which attempts to dereference eset to get filename.
Your patch instead addresses the situation in which eset.do_export() returns None, and thus where 'count > 0' would effectively be 'None > 0'. Since do_export() will return None if it encounters an error, this is certainly valid. Interestingly, in early versions of Python (e.g. 2.6, 2.7) this comparison does not raise an exception, though in later versions it does.
The fix could also be effected by replacing 'count > 0' with 'count is not None and count > 0'.
Addendum: Looking a little more deeply, it seems that do_export() never returns a value. As such, this call to report_model_usage() will always be told that export failed. Very odd.