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:
parent
198fb52d49
commit
3e2fbbd7f5
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user