Avoid crashes with unknown pixel formats