mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 10:18:50 +00:00
Fix bug #6014: Assertion when pasting "\def" into 2.0svn
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30870 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
3a8121ddee
commit
d53c2ec215
@ -670,8 +670,10 @@ void MathMacroTemplate::shiftArguments(size_t from, int by)
|
||||
|
||||
int MathMacroTemplate::maxArgumentInDefinition() const
|
||||
{
|
||||
// We don't have a buffer when pasting from the clipboard (bug 6014).
|
||||
Buffer const * macro_buffer = this->isBufferValid() ? &buffer() : 0;
|
||||
int maxArg = 0;
|
||||
DocIterator it = doc_iterator_begin(&buffer(), this);
|
||||
DocIterator it = doc_iterator_begin(macro_buffer, this);
|
||||
it.idx() = defIdx();
|
||||
for (; it; it.forwardChar()) {
|
||||
if (!it.nextInset())
|
||||
|
Loading…
Reference in New Issue
Block a user