diff --git a/cosmic-app-list/src/app.rs b/cosmic-app-list/src/app.rs index 890ad0b4..5499a265 100755 --- a/cosmic-app-list/src/app.rs +++ b/cosmic-app-list/src/app.rs @@ -264,17 +264,18 @@ fn desktop_info_for_app_ids(mut app_ids: Vec) -> Vec { .iter() .position(|s| s == de.appid || s.eq(&de.name(None).unwrap_or_default())) { - freedesktop_icons::lookup(de.icon().unwrap_or(de.appid)) + let icon = freedesktop_icons::lookup(de.icon().unwrap_or(de.appid)) .with_size(128) .with_cache() - .find() - .map(|buf| DesktopInfo { - id: app_ids.remove(i), - icon: buf, - exec: de.exec().unwrap_or_default().to_string(), - name: de.name(None).unwrap_or_default().to_string(), - path: path.clone(), - }) + .find(); + + Some(DesktopInfo { + id: app_ids.remove(i), + icon: icon.unwrap_or_default(), + exec: de.exec().unwrap_or_default().to_string(), + name: de.name(None).unwrap_or_default().to_string(), + path: path.clone(), + }) } else { None }