~sircmpwn/public-inbox

fdicons: Prevent crashing if hicolor theme not found v1 PROPOSED

Tom Lebreux
Tom Lebreux: 1
 Prevent crashing if hicolor theme not found

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~sircmpwn/public-inbox/patches/9828/mbox | git am -3
Learn more about email & git

[PATCH fdicons] Prevent crashing if hicolor theme not found Export this patch

Tom Lebreux
---
My system does not have XDG_DATA_HOME configured, which means that it does not
look for icons in /usr/share/icons.

Of course an easy fix is to set XDG_DATA_HOME, but I think having a check as
well for the hicolor theme is a good idea.
 src/lookup.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lookup.c b/src/lookup.c
index ee48b2fc85f1..946e0811ce14 100644
--- a/src/lookup.c
+++ b/src/lookup.c
@@ -190,7 +190,7 @@ fd_icon_database_get_icon_criteria(struct fd_icon_database *database,
		}
	}
	icon = fd_icon_theme_get_icon_criteria(database, theme, criteria);
	if (!icon && theme != hicolor) {
	if (!icon && theme != hicolor && hicolor) {
		icon = fd_icon_theme_get_icon_criteria(
				database, hicolor, criteria);
	}
-- 
2.25.0
Thanks!

To gitlab.freedesktop.org:ddevault/fdicons
   3a808f5..47d4c41  master -> master
View this thread in the archives