+2000-11-09 Juergen Vigna <jug@sad.it>
+
+ * src/insets/insettext.C (~InsetText):
+ (clear):
+ (Read):
+ (SetParagraphData): set cache.second to 0 after deleting it!
+ (getLyXText): check if cache.second is not 0 if finding it.
+
2000-11-08 Jean-Marc Lasgouttes <Jean-Marc.Lasgouttes@inria.fr>
* src/frontends/xforms/FormPreferences.C (ColoursLoadBrowser): use
{
// delete all instances of LyXText before deleting the paragraps used
// by it.
- for (Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit){
delete (*cit).second;
+ (*cit).second = 0;
+ }
LyXParagraph * p = par->next;
delete par;
while(p) {
{
// delete all instances of LyXText before deleting the paragraps used
// by it.
- for (Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit){
delete (*cit).second;
+ (*cit).second = 0;
+ }
LyXParagraph * p = par->next;
delete par;
while(p) {
// delete all instances of LyXText before deleting the paragraps used
// by it.
- for (Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit){
delete (*cit).second;
+ (*cit).second = 0;
+ }
LyXParagraph * p = par->next;
delete par;
{
// delete all instances of LyXText before deleting the paragraps used
// by it.
- for (Cache::const_iterator cit = cache.begin(); cit != cache.end(); ++cit)
+ for (Cache::iterator cit = cache.begin(); cit != cache.end(); ++cit){
delete (*cit).second;
+ (*cit).second = 0;
+ }
LyXParagraph * np;
if (par) {
LyXText * InsetText::getLyXText(BufferView * bv) const
{
- if (cache.find(bv) != cache.end())
+ if ((cache.find(bv) != cache.end()) && cache[bv])
return cache[bv];
LyXText * lt = new LyXText(const_cast<InsetText *>(this));
lt->init(bv);