mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
fix memory leak.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@26815 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
b90919e48b
commit
47020302ae
@ -42,7 +42,11 @@ static bool moveItem(Paragraph & fromPar, pos_type fromPos,
|
||||
if (Inset * tmpInset = fromPar.getInset(fromPos)) {
|
||||
fromPar.releaseInset(fromPos);
|
||||
// The inset is not in fromPar any more.
|
||||
return toPar.insertInset(toPos, tmpInset, tmpFont, tmpChange);
|
||||
if (!toPar.insertInset(toPos, tmpInset, tmpFont, tmpChange)) {
|
||||
delete tmpInset;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
char_type const tmpChar = fromPar.getChar(fromPos);
|
||||
|
Loading…
Reference in New Issue
Block a user