Added check for null pointer in lo_ValidEditableElement

git-svn-id: svn://10.0.0.236/trunk@6523 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cmanske%netscape.com 1998-07-27 16:14:29 +00:00
parent 198fb52d49
commit 3e2fbbd7f5
2 changed files with 7 additions and 5 deletions

View File

@ -2864,7 +2864,7 @@ EDT_ClipboardResult CEditBuffer::DeleteChar(XP_Bool bForward, XP_Bool bTyping)
}
}
// After deleting at a boundary between elements,
// caret is always at the end of the current element
// caret is always at the end of the current element to the left of caret.
// Check for this and move to the beginning of next element
// and set flag to use format of this element
// Note that testing for bForward means Backspace key will

View File

@ -1229,10 +1229,12 @@ lo_BumpPosition(MWContext *context, lo_DocState *state, LO_Position* position, B
PRIVATE
Bool lo_ValidEditableElement(MWContext *context, LO_Element* eptr)
{
return lo_EditableElement(eptr->type) &&
( (!EDT_IS_EDITOR(context) ) ||
(eptr->lo_any.edit_element != 0 &&
eptr->lo_any.edit_offset >= 0));
if( eptr )
return lo_EditableElement(eptr->type) &&
( (!EDT_IS_EDITOR(context) ) ||
(eptr->lo_any.edit_element != 0 &&
eptr->lo_any.edit_offset >= 0));
return FALSE;
}
PRIVATE