marook/osm-read — pull request #24 by missinglink (2014-06-27 09:59:46+00:00)
Title: fix parser doesn't exist error

In the case where an `err` is returned and `parser` is `null`; we should check for the existence of `parser` before calling it.

This is currently throwing for me:
```bash
osm-read/lib/pbfParser.js:464
parser.close();
^
TypeError: Cannot call method 'close' of undefined
at fail (osm-read/lib/pbfParser.js:464:24)
at Object.createPathParser.callback (osm-read/lib/pbfParser.js:470:24)
at osm-read/lib/pbfParser.js:409:29
at osm-read/lib/pbfParser.js:350:20
at osm-read/lib/pbfParser.js:66:28
at osm-read/lib/pbfParser.js:42:24
at bytesReadFail (osm-read/lib/nodejs/fsReader.js:5:12)
at osm-read/lib/nodejs/fsReader.js:33:20
at Object.wrapper [as oncomplete] (fs.js:454:17)
```