summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-11-01 14:34:33 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-11-01 21:02:07 +0000
commitc79c3e3ed4489e424f378d603e9247b2f8312733 (patch)
tree8acc509e4c2d8740af1adf5c29cbaaa7ddcafe47 /cui
parent59fc4ae4bd209ebe33872a8610a0b992d68d662b (diff)
coverity#1250409 Explicit null dereferenced
Change-Id: Ib32e7c9eb979b9d6ab60d81423292be5fac87a54
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index f55e11537c0a..8203914010b2 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -343,13 +343,15 @@ generateCustomMenuURL(
OUString url(CUSTOM_MENU_STR );
url += OUString::number( suffix );
+ if (!entries)
+ return url;
+
// now check is there is an already existing entry with this url
SvxEntries::const_iterator iter = entries->begin();
- SvxConfigEntry* pEntry;
while ( iter != entries->end() )
{
- pEntry = *iter;
+ SvxConfigEntry* pEntry = *iter;
if ( url.equals( pEntry->GetCommand() ) )
{