Skip to content

Commit f5f5598

Browse files
committed
Added if condition to check if the color is valid
1 parent ca17166 commit f5f5598

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/Syntax.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,11 @@ void Syntax::loadSyntaxRules(const YAML::Node &config)
6767
continue;
6868
}
6969

70+
//checks if the color is a valid color
71+
if(!color.isValid()){
72+
qWarning() << "Invalid COlor : Skipping...";
73+
continue;
74+
}
7075

7176
// Create a QTextCharFormat for the rule
7277
QTextCharFormat format;

0 commit comments

Comments
 (0)