tvplanit: Fix ZEOS Datastore crashing if ZConnection is open when connected to datastore (issue #33717).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6407 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
wp_xxyyzz
2018-05-12 17:05:40 +00:00
parent efdc6a9ca2
commit 4d4e06ecb9
4 changed files with 20 additions and 7 deletions

View File

@ -544,11 +544,21 @@ begin
exit;
// To do: clear planit lists...
if (AValue <> nil) then begin
wasConnected := AValue.Connected;
AValue.Connected := false;
end else
wasConnected := false;
if FConnection <> nil then
Connected := false;
{
if FConnection <> nil then begin
wasConnected := FConnection.Connected;
Connected := false;
end else
wasConnected := false;
}
FConnection := AValue;
FContactsTable.Connection := FConnection;
FEventsTable.Connection := FConnection;