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:
commit
c32b9b6788
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue