Resolves: rhbz#660342 Undo/Redo crash with postits
(cherry picked from commit 1b58066892daa9365d23b39d7439fbbe7d562b13)
This commit is contained in:
parent
ff50442f39
commit
2912732d42
1 changed files with 3 additions and 2 deletions
|
@ -87,7 +87,8 @@ SwUndoFieldFromDoc::~SwUndoFieldFromDoc()
|
||||||
void SwUndoFieldFromDoc::Undo( SwUndoIter& )
|
void SwUndoFieldFromDoc::Undo( SwUndoIter& )
|
||||||
{
|
{
|
||||||
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
|
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
|
||||||
const SwField * pField = pTxtFld->GetFld().GetFld();
|
|
||||||
|
const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
|
||||||
|
|
||||||
if (pField)
|
if (pField)
|
||||||
{
|
{
|
||||||
|
@ -102,7 +103,7 @@ void SwUndoFieldFromDoc::Undo( SwUndoIter& )
|
||||||
void SwUndoFieldFromDoc::Redo( SwUndoIter& )
|
void SwUndoFieldFromDoc::Redo( SwUndoIter& )
|
||||||
{
|
{
|
||||||
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
|
SwTxtFld * pTxtFld = SwDoc::GetTxtFld(GetPosition());
|
||||||
const SwField * pField = pTxtFld->GetFld().GetFld();
|
const SwField * pField = pTxtFld ? pTxtFld->GetFld().GetFld() : NULL;
|
||||||
|
|
||||||
if (pField)
|
if (pField)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue