fix crash in OMWriter when writing an empty mesh with colors

(cherry picked from commit d0033f99)
6 jobs for OM5.1-with-python