Try to fix sporadic access violation when destroying a non-results-query. Unlikely but probably fixes issue #1494 .

This commit is contained in:
Ansgar Becker
2009-11-29 11:51:29 +00:00
parent 1b1a2c2edc
commit 1995e2e820

View File

@@ -778,7 +778,8 @@ end;
destructor TMySQLQuery.Destroy;
begin
FreeAndNil(FColumnNames);
mysql_free_result(FLastResult);
if HasResult then
mysql_free_result(FLastResult);
inherited Destroy;
end;