From adc81e1c9e43c57bf03f51f12b8d38a9aea5905d Mon Sep 17 00:00:00 2001 From: pdmef Date: Sat, 16 Apr 2005 16:31:19 +0000 Subject: [PATCH] Rocco Rutte fix segfault is stat() on $spoolfile fails (reported by Lars Noschinski) git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@266 e385b8ad-14ed-0310-8656-cc95a2468c6d --- buffy.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buffy.c b/buffy.c index 1f49f91..0112e55 100644 --- a/buffy.c +++ b/buffy.c @@ -303,7 +303,8 @@ int mutt_buffy_check (int force) BuffyCount = 0; BuffyNotify = 0; - if ((!Context || mx_is_local (Context->magic-1)) && stat (Context->path, &contex_sb) != 0) { + if (!Context || !Context->path || + (mx_is_local (Context->magic-1) && stat (Context->path, &contex_sb) != 0)) { /* check device ID and serial number instead of comparing paths */ contex_sb.st_dev = 0; contex_sb.st_ino = 0; -- 2.20.1