result = u32_normalize (UNINORM_NFD, input, input_length, preallocated, &length);
if (!(result != NULL))
return 8;
- if (!(result == preallocated))
+ if (!(preallocated == NULL || result == preallocated))
return 9;
if (!(length == expected_length))
return 10;