Fix crash on image without any colors (all transparent)

This commit is contained in:
Rangi
2026-07-11 13:18:40 -04:00
parent 3b33c942ae
commit 4857ad1e00
4 changed files with 9 additions and 0 deletions
+2
View File
@@ -279,6 +279,8 @@ static void verboseOutputAssignments(
// LCOV_EXCL_STOP
static void decant(std::vector<AssignedSets> &assignments, std::vector<ColorSet> const &colorSets) {
assume(!assignments.empty());
// "Decanting" is the process of moving all *things* that can fit in a lower index there
auto decantOn = [&assignments](auto const &tryDecanting) {
// No need to attempt decanting on palette #0, as there are no palettes to decant to