diff options
author | david_williams | 2005-07-16 16:44:06 +0000 |
---|---|---|
committer | david_williams | 2005-07-16 16:44:06 +0000 |
commit | b2de2deb085ac1de2219f2082bfc1ef0f94f2207 (patch) | |
tree | e1cabff8286573ffb02883eb316f4b7c55de5f1a /bundles/org.eclipse.wst.dtd.core | |
parent | a903b217d08ced09b3466999d4f6aa883dfd9fb8 (diff) | |
download | webtools.sourceediting-b2de2deb085ac1de2219f2082bfc1ef0f94f2207.tar.gz webtools.sourceediting-b2de2deb085ac1de2219f2082bfc1ef0f94f2207.tar.xz webtools.sourceediting-b2de2deb085ac1de2219f2082bfc1ef0f94f2207.zip |
[103896] Memory leak in BasicStructuredDocument
Diffstat (limited to 'bundles/org.eclipse.wst.dtd.core')
-rw-r--r-- | bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java index 5778e8247c..e33ca24009 100644 --- a/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java +++ b/bundles/org.eclipse.wst.dtd.core/src/org/eclipse/wst/dtd/core/internal/document/DTDModelImpl.java @@ -263,10 +263,11 @@ public final class DTDModelImpl extends AbstractStructuredModel implements IStru if (oldStructuredDocument != null) oldStructuredDocument.removeDocumentChangingListener(this); super.setStructuredDocument(newStructuredDocument); - if (newStructuredDocument.getLength() > 0) { - newModel(new NewDocumentEvent(newStructuredDocument, this)); - } - if (newStructuredDocument != null) + if (newStructuredDocument != null) { + if (newStructuredDocument.getLength() > 0) { + newModel(new NewDocumentEvent(newStructuredDocument, this)); + } newStructuredDocument.addDocumentChangingListener(this); + } } } |