From 03bbfe0a5754091f68eab01b15c6fb5726cfbed7 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Fri, 1 Mar 2013 06:16:28 +0100 Subject: [PATCH] coverity#705110: use of invalid iterator Change-Id: I13bb65892ffe09fa6f8bb70321e8846edcdc728c --- reportdesign/source/core/api/ReportDefinition.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx index 14592bc3bd57..d5abf5202343 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2553,7 +2553,7 @@ void SAL_CALL OStylesHelper::replaceByName( const ::rtl::OUString& aName, const { ::osl::MutexGuard aGuard(m_aMutex); TStyleElements::iterator aFind = m_aElements.find(aName); - if ( aFind != m_aElements.end() ) + if ( aFind == m_aElements.end() ) throw container::NoSuchElementException(); if ( !aElement.isExtractableTo(m_aType) ) throw lang::IllegalArgumentException();