From: timriker <timriker@c11ca15a-4712-0410-83d8-924469b57eb5>
Date: Fri, 22 Nov 2002 00:08:24 +0000 (+0000)
Subject: fix death
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=d51d619d64de7dffbf02898cbc79a2a1eecca88c;p=infobot.git

fix death


git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@674 c11ca15a-4712-0410-83d8-924469b57eb5
---

diff --git a/src/dbi.pl b/src/dbi.pl
index fb20e3c..0c9a3f5 100644
--- a/src/dbi.pl
+++ b/src/dbi.pl
@@ -179,12 +179,15 @@ sub dbGetColNiceHash {
 	return;
     }
 
-    # FIXME this dies hard if there are no results
-    %retval = %{ $sth->fetchrow_hashref };
+    my $retval = $sth->fetchrow_hashref();
 
     $sth->finish;
 
-    return %retval;
+    if ($retval) {
+	return %{$retval};
+    } else {
+	return;
+    }
 }
 
 ####