Skip to content

Commit

Permalink
Prevent crash when originalSize is null
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra committed Jun 6, 2024
1 parent 27a788a commit e99fab0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/iconutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ QImage createSvgImageWithCustomColor(const QString &fileName,
return {};
}

const auto sizeToUse = requestedSize.isValid() ? requestedSize : *originalSize;
const auto sizeToUse = requestedSize.isValid() || originalSize == nullptr ? requestedSize : *originalSize;

// some icons are present in white or black only, so, we need to check both when needed
const auto iconBaseColors = QStringList{QStringLiteral("black"), QStringLiteral("white")};
Expand Down

0 comments on commit e99fab0

Please sign in to comment.