From d362088305dbb28569af34e09e5c1808663c4c31 Mon Sep 17 00:00:00 2001 From: Johannes Schlatow Date: Thu, 2 Sep 2010 01:24:58 +0200 Subject: [PATCH] Merge - Fixed segmentation fault if undo.data is empty --- src/TDB.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/TDB.cpp b/src/TDB.cpp index 36f52bcb6..6df89e0a5 100644 --- a/src/TDB.cpp +++ b/src/TDB.cpp @@ -1111,8 +1111,10 @@ void TDB::merge (const std::string& mergeFile) rit = r.begin (); lit = l.begin (); - rline = *rit; - lline = *lit; + if (rit != r.end()) + rline = *rit; + if (lit != l.end()) + lline = *lit; /////////////////////////////////////// // find the branch-off point: