diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 09:06:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-03-11 09:58:36 +0000 |
commit | 556373c41fddbac6cbee1c89e7707631270a1852 (patch) | |
tree | 026862690693419beb8810fdc6671ae30c72a026 /UnoControls/source/controls/progressmonitor.cxx | |
parent | Ensure RTTI symbol visibility for Linux Clang -fsanitize=function,vptr (diff) | |
download | core-556373c41fddbac6cbee1c89e7707631270a1852.tar.gz core-556373c41fddbac6cbee1c89e7707631270a1852.zip |
V668 no sense in testing the result of new against null
Change-Id: I4a33bd92fc8448638a4bfe1eab7e5041a4c5cc39
Diffstat (limited to 'UnoControls/source/controls/progressmonitor.cxx')
-rw-r--r-- | UnoControls/source/controls/progressmonitor.cxx | 29 |
1 files changed, 13 insertions, 16 deletions
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx index a2f19c350da3..e752b006031e 100644 --- a/UnoControls/source/controls/progressmonitor.cxx +++ b/UnoControls/source/controls/progressmonitor.cxx @@ -217,24 +217,21 @@ void SAL_CALL ProgressMonitor::addText( // Else ... take memory for new item ... IMPL_TextlistItem* pTextItem = new IMPL_TextlistItem; - if ( pTextItem != NULL ) - { - // Set values ... - pTextItem->sTopic = rTopic; - pTextItem->sText = rText; + // Set values ... + pTextItem->sTopic = rTopic; + pTextItem->sText = rText; - // Ready for multithreading - MutexGuard aGuard ( m_aMutex ); + // Ready for multithreading + MutexGuard aGuard ( m_aMutex ); - // ... and insert it in right list. - if ( bbeforeProgress ) - { - maTextlist_Top.push_back( pTextItem ); - } - else - { - maTextlist_Bottom.push_back( pTextItem ); - } + // ... and insert it in right list. + if ( bbeforeProgress ) + { + maTextlist_Top.push_back( pTextItem ); + } + else + { + maTextlist_Bottom.push_back( pTextItem ); } // ... update window |