Fix warning/possible crash reported by clang