summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--plugins/sysinfo/unix/backend.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/sysinfo/unix/backend.c b/plugins/sysinfo/unix/backend.c
index dc065518..9d886f09 100644
--- a/plugins/sysinfo/unix/backend.c
+++ b/plugins/sysinfo/unix/backend.c
@@ -67,7 +67,7 @@ char *sysinfo_backend_get_memory(void)
 
 	mem_fmt = sysinfo_format_memory (mem_total, mem_free);
 
-	if (swap_fmt)
+	if (swap_fmt && swap_total != 0)
 	{
 		ret = g_strdup_printf ("Physical: %s Swap: %s", mem_fmt, swap_fmt);
 		g_free (mem_fmt);