* TDOMText.SplitText should check that its argument isn't readonly before doing anything else.

Since the procedure still raises NO_MODIFICATION_ERR later (while inserting new node to the parent),
the testsuite wasn't able to detect this bug, causing the old node to be modified and the new node to leak :/

git-svn-id: trunk@13144 -
This commit is contained in:
sergei 2009-05-15 13:30:31 +00:00
parent 54b475a68b
commit 66c0840bce

View File

@ -2399,6 +2399,7 @@ end;
function TDOMText.SplitText(offset: LongWord): TDOMText;
begin
Changing;
if offset > Length then
raise EDOMIndexSize.Create('Text.SplitText');