aboutsummaryrefslogtreecommitdiff
path: root/src/db.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-07-16 20:00:51 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-07-16 20:00:51 +0000
commit9d56ca219fb7af1c209458f81a8ce35a1b6afd28 (patch)
treef30d9c4f8ed84edaf1d16298ac8dcb2d2b9e2ecc /src/db.cc
parentb9ecadee6e32eddac07d09a228f0dda2b340c7ac (diff)
* Substitute fixes.
Diffstat (limited to 'src/db.cc')
-rw-r--r--src/db.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/db.cc b/src/db.cc
index 89cee32ba..64f9813a4 100644
--- a/src/db.cc
+++ b/src/db.cc
@@ -65,7 +65,10 @@ bool queryDB(const string & filename, const string & dbname,
err = db->get(0, &kt, &dt, 0);
if (err) return false;
- data = string((char *) dt.get_data(), dt.get_size());
+ if (!dt.get_data())
+ data = "";
+ else
+ data = string((char *) dt.get_data(), dt.get_size());
} catch (DbException e) { rethrow(e); }