mysql_free_result() frees memory but does not set pointer to nil. Do that by hand, so later checks for nil don't run into AVs. Probably fixes issue #1901.

This commit is contained in:
Ansgar Becker
2010-05-08 17:49:47 +00:00
parent 593520dc1b
commit e258f7ccec

View File

@@ -640,8 +640,10 @@ begin
FRowsFound := mysql_num_rows(Result);
FRowsAffected := 0;
Log(lcDebug, IntToStr(RowsFound)+' rows found.');
if not DoStoreResult then
if not DoStoreResult then begin
mysql_free_result(Result);
Result := nil;
end;
// No support for real multi results yet, throw them away, so mysql_ping() does not crash on the *next* query.
i := 1;