Skip to content

Commit 404a3b8

Browse files
committed
Adding edge case
1 parent bc89941 commit 404a3b8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Src/DasherCore/ColorIO.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ bool CColorIO::Parse(pugi::xml_document& document, const std::string, bool bUser
124124
break;
125125
}
126126
}
127+
// no fitting group found use default (error) colors
128+
if(UIPreviewColors.size() == 0){
129+
UIPreviewColors = {
130+
ColorPalette::Color(0, 0, 0, 255),
131+
ColorPalette::Color(255, 0, 255, 255),
132+
ColorPalette::Color(0, 0, 0, 255),
133+
ColorPalette::Color(255, 0, 255, 255)
134+
};
135+
}
127136
}
128137
std::array<ColorPalette::Color, 4> uiColorsArray;
129138
std::copy_n(std::make_move_iterator(UIPreviewColors.begin()), uiColorsArray.size(), uiColorsArray.begin());

0 commit comments

Comments
 (0)