Skip to content

Commit

Permalink
Assert/check message highlightColor
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Dec 25, 2023
1 parent 8cc39c5 commit dfa1496
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/messages/layouts/MessageLayout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -342,9 +342,13 @@ void MessageLayout::updateBuffer(QPixmap *buffer,
this->message_->flags.has(MessageFlag::HighlightedWhisper)) &&
!this->flags.has(MessageLayoutFlag::IgnoreHighlights))
{
// Blend highlight color with usual background color
backgroundColor =
blendColors(backgroundColor, *this->message_->highlightColor);
assert(this->message_->highlightColor);
if (this->message_->highlightColor)
{
// Blend highlight color with usual background color
backgroundColor =
blendColors(backgroundColor, *this->message_->highlightColor);
}
}
else if (this->message_->flags.has(MessageFlag::Subscription) &&
ctx.preferences.enableSubHighlight)
Expand Down

0 comments on commit dfa1496

Please sign in to comment.