Fixed #4300 (segmentation fault of cppcheck (invalid code))