Skip to content
Browse files

Fix unwanted enabling FModified flag in user manager dialog, when jus…

…t switching the main tab to "Limitations", followed by a crash due to no focused user. Closes #493.
  • Loading branch information...
ansgarbecker committed May 26, 2019
1 parent 493138d commit 8f9abb2d3cf3de82cc109846d1503ada81e34d58
Showing with 5 additions and 2 deletions.
  1. +5 −2 source/usermanager.pas
@@ -412,16 +412,19 @@ procedure TUserManagerForm.Modification(Sender: TObject);
User: PUser;
if Assigned(listUsers.FocusedNode) and (TWinControl(Sender).Parent = tabLimitations) then begin
if not Assigned(listUsers.FocusedNode) then
if TWinControl(Sender).Parent = tabLimitations then begin
// Any TUpDown triggers a OnChange event on its TEdit when the UpDown gets painted
User := listUsers.GetNodeData(listUsers.FocusedNode);
Modified := Modified
or (editMaxQueries.Text <> IntToStr(User.MaxQueries))
or (editMaxUpdates.Text <> IntToStr(User.MaxUpdates))
or (editMaxConnections.Text <> IntToStr(User.MaxConnections))
or (editMaxUserConnections.Text <> IntToStr(User.MaxUserConnections));
end else
end else begin
Modified := True;

0 comments on commit 8f9abb2

Please sign in to comment.
You can’t perform that action at this time.