diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-05-24 16:18:32 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2015-05-24 16:18:32 +0200 |
commit | 9be6c22ebc225db4d1be7bb0100a2407e9a8eb0c (patch) | |
tree | c41e057ca8321bc282b3e801304f182446e1fb11 | |
parent | 891304bb0ad3af9d8d73f947f25477abf57485a4 (diff) |
tdf#91534: Writer crash using Gallery icon in sidebar
test mpBrowser1 if not NULL + reorder the disposeAndClear calls
(must be reverse order compared to the order of Create calls)
Change-Id: Ia5481430791d9ab73e63d49a0ef0d5e0a6016605
-rw-r--r-- | svx/source/gallery2/GalleryControl.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index 6f87d311b272..66440e7809c7 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -74,9 +74,9 @@ GalleryControl::~GalleryControl() void GalleryControl::dispose() { - mpSplitter.disposeAndClear(); - mpBrowser1.disposeAndClear(); mpBrowser2.disposeAndClear(); + mpBrowser1.disposeAndClear(); + mpSplitter.disposeAndClear(); vcl::Window::dispose(); } @@ -217,7 +217,8 @@ bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, vcl::Window* ) void GalleryControl::GetFocus() { Window::GetFocus(); - mpBrowser1->GrabFocus(); + if (mpBrowser1) + mpBrowser1->GrabFocus(); } void GalleryControl::ThemeSelectionHasChanged() |