diff --git a/Components/ScintEdit.pas b/Components/ScintEdit.pas index 368c93341..a0a5e9221 100644 --- a/Components/ScintEdit.pas +++ b/Components/ScintEdit.pas @@ -549,9 +549,10 @@ function TScintEdit.Call(Msg: Cardinal; WParam: Longint; LParam: Longint): Longi Result := FDirectStatusFunction(FDirectPtr, Msg, WParam, LParam, ErrorStatus); if ErrorStatus <> 0 then begin + var Dummy: Integer; + FDirectStatusFunction(FDirectPtr, SCI_SETSTATUS, 0, 0, Dummy); ErrorFmt('Error status %d returned after Call(%u, %d, %d) = %d', [ErrorStatus, Msg, WParam, LParam, Result]); - FDirectStatusFunction(FDirectPtr, SCI_SETSTATUS, 0, 0, ErrorStatus); end; end;