Merge "Fix potential NULL pointer crash"