summaryrefslogtreecommitdiffstats
path: root/lib/kofficecore/KoDocument.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/kofficecore/KoDocument.cpp')
-rw-r--r--lib/kofficecore/KoDocument.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/kofficecore/KoDocument.cpp b/lib/kofficecore/KoDocument.cpp
index e1422800..67e70ecc 100644
--- a/lib/kofficecore/KoDocument.cpp
+++ b/lib/kofficecore/KoDocument.cpp
@@ -269,6 +269,10 @@ KoDocument::KoDocument( TQWidget * parentWidget, const char *widgetName, TQObjec
KoDocument::~KoDocument()
{
+ if (!d) {
+ return;
+ }
+
d->m_autoSaveTimer.stop();
TQPtrListIterator<KoDocumentChild> childIt( d->m_children );
@@ -288,12 +292,12 @@ KoDocument::~KoDocument()
d->m_children.setAutoDelete( true );
d->m_children.clear();
- d->m_shells.setAutoDelete( true );
d->m_shells.clear();
delete d->m_dcopObject;
delete d->filterManager;
delete d;
+ d=0L;
s_documentList->removeRef(this);
// last one?
if(s_documentList->isEmpty()) {