mirror of
https://github.com/danbulant/icon
synced 2026-05-24 12:22:13 +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,
|
scale: u32,
|
||||||
theme: &str,
|
theme: &str,
|
||||||
) -> Option<IconFile> {
|
) -> Option<IconFile> {
|
||||||
|
if icon_name.is_empty() {
|
||||||
|
return None;
|
||||||
|
}
|
||||||
|
|
||||||
let theme = self.theme(theme).or_else(|| self.theme("hicolor"))?;
|
let theme = self.theme(theme).or_else(|| self.theme("hicolor"))?;
|
||||||
theme
|
theme
|
||||||
.find_icon(icon_name, size, scale)
|
.find_icon(icon_name, size, scale)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue