diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/item.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/item.cc b/src/item.cc index 99d1d835..f86b8ec8 100644 --- a/src/item.cc +++ b/src/item.cc @@ -437,9 +437,12 @@ void print_item(std::ostream& out, const item_t& item, const string& prefix) string item_context(const item_t& item, const string& desc) { + if (! item.pos) + return empty_string; + std::streamoff len = item.pos->end_pos - item.pos->beg_pos; if (! len) - return _("<no item context>"); + return empty_string; assert(len > 0); assert(len < 2048); |