Fix a bug pointed out by the Static Analyzer.
Merge pull request #344 from MaddTheSane/staticFix

Fix a bug pointed out by the Static Analyzer.