diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-11-01 14:34:33 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-11-01 21:02:07 +0000 |
commit | c79c3e3ed4489e424f378d603e9247b2f8312733 (patch) | |
tree | 8acc509e4c2d8740af1adf5c29cbaaa7ddcafe47 /cui | |
parent | coverity#736401 Resource leak (diff) | |
download | core-c79c3e3ed4489e424f378d603e9247b2f8312733.tar.gz core-c79c3e3ed4489e424f378d603e9247b2f8312733.zip |
coverity#1250409 Explicit null dereferenced
Change-Id: Ib32e7c9eb979b9d6ab60d81423292be5fac87a54
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/cfg.cxx | 6 |
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() ) ) { |