Prevent possible NULL pointer deference

Raised by cppcheck
1 file changed