mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Safety check if PMYSQL handle is assigned in Ping() method. Tries to fix a sporadic access violation, unreproducible here but reported here: http://www.heidisql.com/forum.php?t=4694
This commit is contained in:
@ -352,7 +352,7 @@ end;
|
|||||||
|
|
||||||
function TMySQLConnection.Ping: Boolean;
|
function TMySQLConnection.Ping: Boolean;
|
||||||
begin
|
begin
|
||||||
if FActive and (mysql_ping(FHandle) <> 0) then begin
|
if FActive and ((FHandle=nil) or (mysql_ping(FHandle) <> 0)) then begin
|
||||||
Active := False;
|
Active := False;
|
||||||
ClearCache;
|
ClearCache;
|
||||||
end;
|
end;
|
||||||
|
Reference in New Issue
Block a user