diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-13 08:31:05 +0900 |
---|---|---|
committer | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2015-05-13 08:40:43 +0900 |
commit | 02eff9d83734b99996b30cf65768f27bfc0e161b (patch) | |
tree | 1e23937b8c6fbc9ae8fbfaf498fe2d63027837e5 /svtools | |
parent | d85412e08c8817be7c80d8b1b76874b9da4b0aeb (diff) |
fix crasher in ValueSet
Change-Id: I846ebbf70f90c417fafd8cba8148c88f70d0c398
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/control/valueset.cxx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index ff7351ca1a87..29c9e18c3488 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -2264,8 +2264,12 @@ long ValueSet::GetScrollWidth() const { if (GetStyle() & WB_VSCROLL) { - const_cast<ValueSet*>(this)->Invalidate(); - const_cast<ValueSet*>(this)->ImplInitScrollBar(); + ValueSet* pValueSet = const_cast<ValueSet*>(this); + if (!mxScrollBar) + { + pValueSet->ImplInitScrollBar(); + } + pValueSet->Invalidate(); return mxScrollBar->GetSizePixel().Width() + SCRBAR_OFFSET; } else |