mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user