Fixed a static analysis issue detected by Coverity Scan.