summaryrefslogtreecommitdiff
path: root/database/database.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'database/database.cpp')
-rw-r--r--database/database.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/database/database.cpp b/database/database.cpp
index 9c08c00..fa2e9b8 100644
--- a/database/database.cpp
+++ b/database/database.cpp
@@ -134,7 +134,12 @@ bool cRow::fetchColumn(char** Column, char** Value){
MESSAGE("Fetching column %s='%s' (%d/%d)", this->Columns[currentCol], this->Values[currentCol], currentCol+1, this->ColCount);
#endif
*Column = strdup0(this->Columns[currentCol]);
- *Value = strcasecmp(this->Values[currentCol],"NULL")?strdup0(this->Values[currentCol]):NULL;
+ if(this->Values[currentCol]){
+ *Value = strcasecmp(this->Values[currentCol],"NULL")?strdup0(this->Values[currentCol]):NULL;
+ }
+ else {
+ *Value = NULL;
+ }
currentCol++;
return true;
}