From 417a8624c7dd11da99f30e8d62bb4f53becd318e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 28 Jan 2014 09:32:25 +0000 Subject: coverity#440811 Dereference null return value Change-Id: Iccf2f6dd757fe8d14a2f68a0492ea898d2f95490 --- sfx2/source/control/bindings.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sfx2') diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx index 33e05cf80d53..51bebd48170e 100644 --- a/sfx2/source/control/bindings.cxx +++ b/sfx2/source/control/bindings.cxx @@ -1915,7 +1915,10 @@ void SfxBindings::SetDispatcher( SfxDispatcher *pDisp ) void SfxBindings::ClearCache_Impl( sal_uInt16 nSlotId ) { - GetStateCache(nSlotId)->ClearCache(); + SfxStateCache* pCache = GetStateCache(nSlotId); + if (!pCache) + return + pCache->ClearCache(); } //-------------------------------------------------------------------- -- cgit v1.2.3