Skip to content

Instantly share code, notes, and snippets.

@afh
Created December 16, 2014 17:55
Show Gist options
  • Save afh/391bde204d5c66d235a4 to your computer and use it in GitHub Desktop.
Save afh/391bde204d5c66d235a4 to your computer and use it in GitHub Desktop.
diff --git a/src/filters.cc b/src/filters.cc
index bdc2983..d24188f 100644
--- a/src/filters.cc
+++ b/src/filters.cc
@@ -983,7 +983,7 @@ void interval_posts::flush()
sort_posts_by_date());
// Determine the beginning interval by using the earliest post
- if (all_posts.front() &&
+ if (all_posts.size() > 0 && all_posts.front() &&
! interval.find_period(all_posts.front()->date()))
throw_(std::logic_error, _("Failed to find period for interval report"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment