all repos — tint2 @ c8ccf053ff98da6745ac1ecc311b6925e08f60cf

fork of the tint2 desktop panel for my custom setup - only minimized windows across all desktops for the taskbar

tint2conf: fix segfault in corner case
o9000 mrovi9000@gmail.com
commit

c8ccf053ff98da6745ac1ecc311b6925e08f60cf

parent

2f74250634c85c14787f6fc649b39e9bdaae1f5a

1 files changed, 9 insertions(+), 3 deletions(-)

jump to
M src/tint2conf/theme_view.csrc/tint2conf/theme_view.c

@@ -145,10 +145,16 @@

GtkTreeIter iter; gtk_list_store_append(theme_list_store, &iter); - gchar *name = strrchr(path, '/') + 1; + gchar *name, *dir; - gchar *dir = g_strdup(path); - strrchr(dir, '/')[0] = 0; + if (strchr(path, '/')) { + name = strrchr(path, '/') + 1; + dir = g_strdup(path); + strrchr(dir, '/')[0] = 0; + } else { + name = (gchar*)path; + dir = g_strdup("."); + } char *suffix = contract_tilde(dir); g_free(dir);