fix: check get_icon return non nullpt

This commit is contained in:
Alex 2020-11-26 15:10:33 +01:00 committed by GitHub
parent fd11711673
commit 374d5ae5a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -95,7 +95,7 @@ static std::string get_from_desktop_app_info(const std::string &app_id)
if (!app_info)
app_info = Gio::DesktopAppInfo::create_from_filename(prefix + folder + app_id + suffix);
if (app_info)
if (app_info && app_info->get_icon() != nullptr)
return app_info->get_icon()->to_string();
return "";