summaryrefslogtreecommitdiff
path: root/src/filters.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@fpcomplete.com>2013-01-11 00:10:30 -0600
committerJohn Wiegley <johnw@fpcomplete.com>2013-01-11 00:10:30 -0600
commit82ac7ef313ae8a8d9251706d66345efed6bf90ab (patch)
treeac841a44a62a267a676f4e6158e8b77cc3e336f1 /src/filters.cc
parent63a14fd5e0aeb64a0508ddac71803acc926425c5 (diff)
downloadfork-ledger-82ac7ef313ae8a8d9251706d66345efed6bf90ab.tar.gz
fork-ledger-82ac7ef313ae8a8d9251706d66345efed6bf90ab.tar.bz2
fork-ledger-82ac7ef313ae8a8d9251706d66345efed6bf90ab.zip
Guard against a possible NULL
Diffstat (limited to 'src/filters.cc')
-rw-r--r--src/filters.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/filters.cc b/src/filters.cc
index 5e2bf983..7570809a 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -983,7 +983,8 @@ void interval_posts::flush()
sort_posts_by_date());
// Determine the beginning interval by using the earliest post
- if (! interval.find_period(all_posts.front()->date()))
+ if (all_posts.front() &&
+ ! interval.find_period(all_posts.front()->date()))
throw_(std::logic_error, _("Failed to find period for interval report"));
// Walk the interval forward reporting all posts within each one