diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2017-05-18 23:25:32 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-05-25 21:44:56 +0200 |
commit | 4b6bc4e012bde5737f279377c8186faf38a888ad (patch) | |
tree | 52d3ef4b32939b01a9138ce7ab60dfa717ee9a52 | |
parent | 30c17a288b03656633b626f6e7f679ca7c1aa6ff (diff) |
fix gdi resource leak (editeng/impedit)
Change-Id: Ia2d9ad88b5bcc2adf7f28ac7833132c04045d55b
Reviewed-on: https://gerrit.libreoffice.org/37802
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | editeng/source/editeng/impedit.cxx | 1 | ||||
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx index e4eb6156b27e..f76bd36fecb6 100644 --- a/editeng/source/editeng/impedit.cxx +++ b/editeng/source/editeng/impedit.cxx @@ -1728,6 +1728,7 @@ void ImpEditView::dragGestureRecognized(const css::datatransfer::dnd::DragGestur SolarMutexGuard aVclGuard; + delete pDragAndDropInfo; pDragAndDropInfo = nullptr; Point aMousePosPixel( rDGE.DragOriginX, rDGE.DragOriginY ); diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index 291a95ad572a..84f961823b13 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -132,6 +132,10 @@ struct DragAndDropInfo bHasValidData = false; bUndoAction = false; bOutlinerMode = false; nSensibleRange = 0; nCursorWidth = 0; pField = nullptr; nOutlinerDropDest = 0; bDragAccepted = false; } + ~DragAndDropInfo() + { + pBackground.disposeAndClear(); + } }; struct ImplIMEInfos |