Cppcheck: fix Logical conjunction always evaluates to false

Fix https://sourceforge.net/p/avogadro/bugs/672/

Change-Id: I4591a81700ea6b63aae4d3958b3970c54704fb6c
Merge topic 'cppcheck_logical_conjunction' into master

7f48be8b Cppcheck: fix Logical conjunction always evaluates to false