core/colorpipeline: don't crash with weird HDR metadata

This should address https://crash-reports.kde.org/organizations/kde/issues/95280.

I'm not sure how exactly such a situation gets created in practice, but the autotest should still catch the same problem anyways.

Merge request reports

Loading