Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2005-02-25 04:47:55 -0500
committerslewis2005-02-25 04:47:55 -0500
commit9e6a393d71d3912a415706a10048e12ee7315fa4 (patch)
treebfc6b9d0adc46c337da5b587a20a165bcc440267 /examples/bundles/org.eclipse.ecf.sdo/src/org
parent09227501465bc4f780e64101e683c51f4cb5c45a (diff)
downloadorg.eclipse.ecf-9e6a393d71d3912a415706a10048e12ee7315fa4.tar.gz
org.eclipse.ecf-9e6a393d71d3912a415706a10048e12ee7315fa4.tar.xz
org.eclipse.ecf-9e6a393d71d3912a415706a10048e12ee7315fa4.zip
Fix for null pointer exception when context is nulled out by wrapper before dispose is called.
Diffstat (limited to 'examples/bundles/org.eclipse.ecf.sdo/src/org')
-rw-r--r--examples/bundles/org.eclipse.ecf.sdo/src/org/eclipse/ecf/internal/sdo/SharedDataGraph.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/examples/bundles/org.eclipse.ecf.sdo/src/org/eclipse/ecf/internal/sdo/SharedDataGraph.java b/examples/bundles/org.eclipse.ecf.sdo/src/org/eclipse/ecf/internal/sdo/SharedDataGraph.java
index a3678414f..2f3fa0baf 100644
--- a/examples/bundles/org.eclipse.ecf.sdo/src/org/eclipse/ecf/internal/sdo/SharedDataGraph.java
+++ b/examples/bundles/org.eclipse.ecf.sdo/src/org/eclipse/ecf/internal/sdo/SharedDataGraph.java
@@ -14,6 +14,7 @@ import java.io.IOException;
import org.eclipse.ecf.core.ISharedObject;
import org.eclipse.ecf.core.ISharedObjectConfig;
+import org.eclipse.ecf.core.ISharedObjectContext;
import org.eclipse.ecf.core.SharedObjectInitException;
import org.eclipse.ecf.core.events.ISharedObjectActivatedEvent;
import org.eclipse.ecf.core.events.ISharedObjectDeactivatedEvent;
@@ -273,10 +274,12 @@ public class SharedDataGraph implements ISharedObject,
* @see org.eclipse.ecf.core.ISharedObject#dispose(org.eclipse.ecf.identity.ID)
*/
public synchronized void dispose(ID containerID) {
- if (config != null
- && config.getContext().getLocalContainerID()
- .equals(containerID))
- config = null;
+ if (config != null) {
+ ISharedObjectContext context = config.getContext();
+ if (context != null && context.getLocalContainerID().equals(containerID)) {
+ config = null;
+ }
+ }
}
public String toString() {

Back to the top