diff --git a/src/platforms/gbm-kms/server/kms/real_kms_output.cpp b/src/platforms/gbm-kms/server/kms/real_kms_output.cpp index d8896d2f4cf..8bef51c5c33 100644 --- a/src/platforms/gbm-kms/server/kms/real_kms_output.cpp +++ b/src/platforms/gbm-kms/server/kms/real_kms_output.cpp @@ -360,6 +360,12 @@ void mgg::RealKMSOutput::set_power_mode(MirPowerMode mode) void mgg::RealKMSOutput::set_gamma(mg::GammaCurves const& gamma) { + if (!gamma.red.size()) + { + mir::log_warning("Ignoring attempt to set zero length gamma"); + return; + } + if (!ensure_crtc()) { mir::log_warning("Output %s has no associated CRTC to set gamma on",