File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
app/display/model/src/main/java/org/csstudio/display/builder/model/persist Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -167,8 +167,12 @@ public Optional<ColorDefinition> parseColorDefinition(final String colorDefiniti
167167 if (colorDefinitionStringTrimmed .startsWith ("alias(" )) {
168168 if (colorDefinitionStringTrimmed .endsWith (")" )) {
169169 String colorName = colorDefinitionStringTrimmed .substring (6 ,colorDefinitionStringTrimmed .length ()-1 ).trim ();
170- NamedWidgetColor color = colors .get (colorName );
171- return Optional .of (new Alias (color ));
170+ if (colors .containsKey (colorDefinitionStringTrimmed )) {
171+ NamedWidgetColor color = colors .get (colorName );
172+ return Optional .of (new Alias (color ));
173+ } else {
174+ return Optional .empty ();
175+ }
172176 }
173177 else {
174178 return Optional .empty ();
You can’t perform that action at this time.
0 commit comments