src/res_parse.y: handle resource globals gracefully.
commit63f61d2766f2ec3f1a1a0cee97a0e4898d0853b1
authorMarkus Hitter <mah@jump-ing.de>
Wed, 31 Jul 2013 16:44:27 +0000 (31 18:44 +0200)
committerMartin Kupec <martin.kupec@kupson.cz>
Thu, 22 Aug 2013 18:07:16 +0000 (22 20:07 +0200)
treecfb692dfef952759639703118b5a90b79f210aad
parent5a065874777ac01663b6aac4a61401d39417c93a
src/res_parse.y: handle resource globals gracefully.

Likely, res_file is used somewhere to check something. In case a
resource file was loaded earlier, but the current parsing is from
a string, res_file is still != NULL, so this check would mislead.

Solution: Clear res_file and res_filename as soon as the file
          behind it gets closed.

Also replace a number of zeros with the more appropriate NULL.

Affects-bug: lp-1206882
src/res_parse.y