From d4e324d79f9c6bdfad72369a08f64854a08c804a Mon Sep 17 00:00:00 2001 From: EnumDev Date: Mon, 22 Dec 2025 20:02:02 +0200 Subject: [PATCH] Do not attempt to show memory if not found --- src/modules.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules.go b/src/modules.go index 44b3f37..e7d2ec3 100644 --- a/src/modules.go +++ b/src/modules.go @@ -256,6 +256,10 @@ func initializeModuleMap() { memoryModule := StormfetchModule{stormfetchModuleConfig: stormfetchModuleConfig{Name: "memory", Format: "%3Memory: %4$MEM_USED MiB / $MEM_TOTAL MiB"}, Execute: func(sm StormfetchModule) string { memoryInfo := GetMemoryInfo() + if memoryInfo == nil { + return "" + } + return os.Expand(sm.Format, func(s string) string { switch s { case "MEM_TOTAL":