Qt: trial to fix all qtcaret crashes.

git-svn-id: trunk@12240 -
This commit is contained in:
zeljko 2007-09-29 13:15:11 +00:00
parent b9d2ceec0d
commit fcf28f8985

View File

@ -342,7 +342,7 @@ end;
procedure TEmulatedCaret.SetPos(const Value: TQtPoint);
begin
if (FWidget = nil) then
if (FWidget = nil) or (FWidget.Widget = nil) then
begin
FPos.X := 0;
FPos.Y := 0;
@ -438,7 +438,7 @@ procedure TEmulatedCaret.UpdateCaret;
var
R: TRect;
begin
if (FWidget <> nil) then
if (FWidget <> nil) and (FWidget.Widget <> nil) then
begin
R.Left := FPos.x;
R.Top := FPos.y;