This is another ad-hoc solution for the problem of a zero buffer pointer while reading a document or when using cut&paste.
This simple solution would be suitable for branch.
see also e.g. r29085, r28319, bug #5688.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31861
a592a061-630c-0410-9148-
cb99ea01b6c8
label_[row] = dummy_pointer;
// We need an update of the Buffer reference cache.
// This is achieved by updateLabels().
- buffer().updateLabels();
+ if (buffer_)
+ buffer().updateLabels();
} else {
- label_[row]->updateCommand(label);
+ if (buffer_)
+ label_[row]->updateCommand(label);
+ else
+ label_[row]->setParam("name", label);
}
return;
}