Check if the pth is a valid directory before to look for icons.
This commit is contained in:
@@ -158,6 +158,8 @@ void main_window::SetAppIconFromPath(const std::string path)
|
|||||||
std::string path_list[] = { path, sstr(qpath.section("/", 0, -2)), sstr(qpath.section("/", 0, -3)) };
|
std::string path_list[] = { path, sstr(qpath.section("/", 0, -2)), sstr(qpath.section("/", 0, -3)) };
|
||||||
for (std::string pth : path_list)
|
for (std::string pth : path_list)
|
||||||
{
|
{
|
||||||
|
if (!fs::is_dir(pth)) continue;
|
||||||
|
|
||||||
for (std::string ico : icon_list)
|
for (std::string ico : icon_list)
|
||||||
{
|
{
|
||||||
ico = pth + ico;
|
ico = pth + ico;
|
||||||
|
|||||||
Reference in New Issue
Block a user