From 51de0816162090a702dc9608c34e237b912104c6 Mon Sep 17 00:00:00 2001 From: nick black Date: Fri, 10 Sep 2021 01:52:37 -0500 Subject: [PATCH] [ncneofetch] don't go just printing NULLs --- src/fetch/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/fetch/main.c b/src/fetch/main.c index 351708aa9..1d7bc9399 100644 --- a/src/fetch/main.c +++ b/src/fetch/main.c @@ -446,8 +446,8 @@ infoplane_notcurses(struct notcurses* nc, const fetched_info* fi, int planeheigh ncplane_printf_aligned(infop, 2, NCALIGN_RIGHT, "Processes: %hu ", sinfo.procs); ncplane_printf_aligned(infop, 2, NCALIGN_LEFT, " RAM: %sB/%sB", usedmet, totalmet); #endif - ncplane_printf_aligned(infop, 3, NCALIGN_LEFT, " DM: %s", fi->desktop); - ncplane_printf_aligned(infop, 3, NCALIGN_RIGHT, "Shell: %s ", fi->shell); + ncplane_printf_aligned(infop, 3, NCALIGN_LEFT, " DM: %s", fi->desktop ? fi->desktop : "n/a"); + ncplane_printf_aligned(infop, 3, NCALIGN_RIGHT, "Shell: %s ", fi->shell ? fi->shell : "n/a"); if(notcurses_cantruecolor(nc)){ ncplane_printf_aligned(infop, 4, NCALIGN_LEFT, " RGB TERM: %s", fi->term); nccell c = CELL_CHAR_INITIALIZER('R');