Fix potential sigsegv caught by Clang 3.3