From 4866aba384e9da075e963d99fc642ec5e6c809ca Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Wed, 7 Dec 2011 05:12:23 +0100 Subject: NULL fields should not be returned as NULL calling the callback with NULL as value will result in an assertion, that a basic_string could not created from a NULL pointer --- ts3db.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/ts3db.c b/ts3db.c index 33bc9b0..69085f4 100644 --- a/ts3db.c +++ b/ts3db.c @@ -232,14 +232,8 @@ unsigned int ts3dbplugin_open(unsigned int connection_nr, const char* query, log("new row done.", LOG_DEBUG); for (j = 0; j < col_count; j++) { - if (PQgetisnull(result, i, j) == 1) { - log("", LOG_DEBUG); - new_value(j, NULL, context); - } - else { - log(PQgetvalue(result, i, j), LOG_DEBUG); - new_value(j, PQgetvalue(result, i, j), context); - } + log(PQgetvalue(result, i, j), LOG_DEBUG); + new_value(j, PQgetvalue(result, i, j), context); } } -- cgit v1.2.3