FIX: ensures result before clearing on #query_hash (#3)

FIX: ensures result before clearing on #query_hash (#3)

diff --git a/lib/mini_sql/postgres/connection.rb b/lib/mini_sql/postgres/connection.rb
index 6a0c2f3..d1a1b2c 100644
--- a/lib/mini_sql/postgres/connection.rb
+++ b/lib/mini_sql/postgres/connection.rb
@@ -98,7 +98,7 @@ module MiniSql
         result.type_map = type_map
         result.to_a
       ensure
-        result.clear
+        result.clear if result
       end
 
       def build(sql)

GitHub sha: aba480db