1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
Description: Fix SymbolBrowser getting no symbols and crashing
If the last document is closed then a new untitled document is created.
But this document did no get "activated" and therefore did not get any
symbols which in turn led to a null pointer crash when trying to save
later. The actual bug was a kept pointer to the previously closed and
deleted document. If the new document was accidentally created at the
same memory address then it was handled as the old and not "activated".
Author: Philipp Wiesemann <philipp.wiesemann@arcor.de>
@@ -218,6 +218,9 @@
}
void DocViewer::removeDocFromList(Juff::Document* doc) {
+ if ( curDoc_ == doc ) {
+ curDoc_ = NullDoc::instance();
+ }
docStack_.removeAll(doc);
}
|