A fix for a Fedora 28 bug
Zan Lynx <[email protected]> Tue, 3 Apr 2018 23:35:58 -0600
| Newsgroups | gmane.comp.gnome.apps.pan.devel |
|---|---|
| Message-ID | <[email protected]> |
I just found this Pan bug after upgrading to Fedora 28. It's because of new compilers and C++ libraries, etc. And because calling front() on an empty container is a bug. Patch: From 564d931d4f88eaea18bb30abd7ffd8b4ba468bc8 Mon Sep 17 00:00:00 2001 From: Jonathan Briggs <[email protected]> Date: Tue, 3 Apr 2018 23:29:20 -0600 Subject: [PATCH] Do not use front() on empty vector. --- pan/data-impl/rules-filter.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pan/data-impl/rules-filter.cc b/pan/data-impl/rules-filter.cc index abc2506..c0d26c4 100644 --- a/pan/data-impl/rules-filter.cc +++ b/pan/data-impl/rules-filter.cc @@ -36,7 +36,9 @@ RulesFilter :: finalize (Data& data) _delete.clear(); const std::vector<const Article*> tmp (_mark_read.begin(), _mark_read.end()); - data.mark_read ((const Article**)&tmp.front(), tmp.size()); + if (!tmp.empty()) { + data.mark_read ((const Article**)&tmp.front(), tmp.size()); + } _mark_read.clear(); const std::vector<const Article*> tmp2 ( _cached.begin(), _cached.end()); -- 2.17.0 -- Knowledge is Power -- Power Corrupts Study Hard -- Be Evil