summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-05-24 16:18:32 +0200
committerJoren De Cuyper <jorendc@libreoffice.org>2015-05-25 11:53:58 +0000
commitc37448c13c343d96a5902d3746203573faafa731 (patch)
treef9afa6f31c4db7853b8ddbd9f0be2c3092650dd7 /svx
parentd40c30e4e42e7c020486644a1340966f59241cbb (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) Cherry-picked from 9be6c22ebc225db4d1be7bb0100a2407e9a8eb0c Change-Id: Ia5481430791d9ab73e63d49a0ef0d5e0a6016605 Reviewed-on: https://gerrit.libreoffice.org/15885 Reviewed-by: Joren De Cuyper <jorendc@libreoffice.org> Tested-by: Joren De Cuyper <jorendc@libreoffice.org>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/gallery2/GalleryControl.cxx7
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()