Kaydet (Commit) f9dd9b86 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1358029 Dereference null return value

and

coverity#1358028 Dereference null return value

Change-Id: Id659899b0df87a78359a9332be571afb326538df
üst 4e444871
......@@ -388,7 +388,7 @@ void BookmarkTable::InsertBookmark(sw::mark::IMark* pMark)
SvTreeListEntry* BookmarkTable::GetRowByBookmarkName(const OUString& sName)
{
SvTreeListEntry* pEntry = First();
for (sal_Int32 i = GetRowCount(); i; i--)
while (pEntry)
{
sw::mark::IMark* pBookmark = static_cast<sw::mark::IMark*>(pEntry->GetUserData());
if (pBookmark->GetName() == sName)
......@@ -422,7 +422,7 @@ OUString BookmarkTable::GetNameProposal()
{
sal_Int32 nHighestBookmarkId = 0;
SvTreeListEntry* pEntry = First();
for (sal_Int32 i = GetRowCount(); i; i--)
while (pEntry)
{
sw::mark::IMark* pBookmark = static_cast<sw::mark::IMark*>(pEntry->GetUserData());
OUString sName = pBookmark->GetName();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment