check for bin == NULL
authorMarkus Teich <markus.teich@stusta.mhn.de>
Tue, 8 Dec 2015 21:34:48 +0000 (22:34 +0100)
committerMarkus Teich <markus.teich@stusta.mhn.de>
Tue, 8 Dec 2015 21:34:48 +0000 (22:34 +0100)
sent.c

diff --git a/sent.c b/sent.c
index 5f3cb5905fdf39d86753c2c047ece7afc9131c2d..5c725974606e2f6d8e5e30116a5c0c558b745dab 100644 (file)
--- a/sent.c
+++ b/sent.c
@@ -173,7 +173,8 @@ Image *ffopen(char *filename)
                            REG_NOSUB | REG_EXTENDED | REG_ICASE))
                        continue;
                if (!regexec(&regex, filename, 0, NULL, 0)) {
-                       bin = filters[i].bin;
+                       if (!(bin = filters[i].bin))
+                               return NULL;
                        break;
                }
        }