diff options
author | Eike Rathke <erack@redhat.com> | 2014-11-07 21:34:52 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2014-11-07 22:02:48 +0100 |
commit | bbdecd902bf2844d781dc1550a1d24bcac80b260 (patch) | |
tree | 1433a8ab9df366efee85f105de0bf8ec1edd639f /sc | |
parent | d58c32fc168d7c8431e09e7fd275eaed68e13a7d (diff) |
coverity#735814 Explicit null dereferenced
Change-Id: I7c6ebe65cd8c3364b541b5545ab36a13d155a61c
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/namedlg/namedefdlg.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index 214bfb152172..43b4ecc6182c 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -237,8 +237,10 @@ void ScNameDefDlg::AddPushed() if (!mpDoc->GetTable(aScope, nTab)) nTab = -1; - mpDocShell->GetUndoManager()->AddUndoAction( - new ScUndoAddRangeData( mpDocShell, pNewEntry, nTab) ); + assert( pNewEntry); // undo of no insertion smells fishy + if (pNewEntry) + mpDocShell->GetUndoManager()->AddUndoAction( + new ScUndoAddRangeData( mpDocShell, pNewEntry, nTab) ); // set table stream invalid, otherwise RangeName won't be saved if no other // call invalidates the stream |