summaryrefslogtreecommitdiff
path: root/src/item.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-01-18 12:54:41 -0500
committerJohn Wiegley <johnw@newartisans.com>2010-01-18 12:54:41 -0500
commitc6873d32aa121289e87be7eb16ff531c6d468d2a (patch)
treec77cbf49617aea589cac7c4b0ca245f426793fd5 /src/item.cc
parente3c8b91b5faedafd6b8f6a9a4c54638eba78c769 (diff)
parent67ce17e24959f55a4cd55857c7741d058397d758 (diff)
downloadfork-ledger-c6873d32aa121289e87be7eb16ff531c6d468d2a.tar.gz
fork-ledger-c6873d32aa121289e87be7eb16ff531c6d468d2a.tar.bz2
fork-ledger-c6873d32aa121289e87be7eb16ff531c6d468d2a.zip
Merge branch 'next'
Diffstat (limited to 'src/item.cc')
-rw-r--r--src/item.cc5
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);