Skip to content

Commit

Permalink
Ignore zero length gamma curves
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanGriffiths committed Feb 22, 2024
1 parent d0a68ae commit 0a89793
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/platforms/gbm-kms/server/kms/real_kms_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 0a89793

Please sign in to comment.