Merge pull request #2175 from strk/2.2.x-segfault-on-execute

Do not attempt to PQclear a null PQresult*
This commit is contained in:
Dane Springmeyer 2014-03-09 21:04:58 -07:00
commit c32b9b6788

View file

@ -85,7 +85,7 @@ public:
PGresult *result = PQexec(conn_, sql.c_str());
bool ok = (result && (PQresultStatus(result) == PGRES_COMMAND_OK));
PQclear(result);
if ( result ) PQclear(result);
return ok;
}