mirror of
https://github.com/danbulant/icon
synced 2026-05-19 04:08:36 +00:00
Give up on empty icon names
This commit is contained in:
parent
0b3e9a9987
commit
79dbfa3c09
1 changed files with 4 additions and 0 deletions
|
|
@ -65,6 +65,10 @@ impl Icons {
|
|||
scale: u32,
|
||||
theme: &str,
|
||||
) -> Option<IconFile> {
|
||||
if icon_name.is_empty() {
|
||||
return None;
|
||||
}
|
||||
|
||||
let theme = self.theme(theme).or_else(|| self.theme("hicolor"))?;
|
||||
theme
|
||||
.find_icon(icon_name, size, scale)
|
||||
|
|
|
|||
Loading…
Reference in a new issue