mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-18 15:49:27 +02:00
SynEdit: Small Refactor. Workaround for a crash when SynEdit is destroyed to early
git-svn-id: trunk@18572 -
This commit is contained in:
parent
d156b92d1b
commit
d0ff603108
@ -6426,9 +6426,9 @@ begin
|
||||
{$ENDIF}
|
||||
// first the program event handler gets a chance to process the command
|
||||
DoOnProcessCommand(Command, AChar, Data);
|
||||
try
|
||||
BeginUndoBlock;
|
||||
if Command <> ecNone then begin
|
||||
if Command <> ecNone then begin
|
||||
try
|
||||
BeginUndoBlock;
|
||||
// notify hooked command handlers before the command is executed inside of
|
||||
// the class
|
||||
NotifyHookedCommandHandlers(FALSE, Command, AChar, Data);
|
||||
@ -6437,17 +6437,13 @@ begin
|
||||
ExecuteCommand(Command, AChar, Data);
|
||||
// notify hooked command handlers after the command was executed inside of
|
||||
// the class
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
if Command <> ecNone then
|
||||
{$ENDIF}
|
||||
NotifyHookedCommandHandlers(TRUE, Command, AChar, Data);
|
||||
if Command <> ecNone then
|
||||
DoOnCommandProcessed(Command, AChar, Data);
|
||||
finally
|
||||
EndUndoBlock;
|
||||
end;
|
||||
{$IFDEF SYN_LAZARUS}
|
||||
if Command <> ecNone then
|
||||
{$ENDIF}
|
||||
DoOnCommandProcessed(Command, AChar, Data);
|
||||
finally
|
||||
EndUndoBlock;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user