directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r822003 - /directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
Date Mon, 05 Oct 2009 20:56:10 GMT
Author: seelmann
Date: Mon Oct  5 20:56:09 2009
New Revision: 822003

URL: http://svn.apache.org/viewvc?rev=822003&view=rev
Log:
Fixed NullPointerException

Modified:
    directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java

Modified: directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java?rev=822003&r1=822002&r2=822003&view=diff
==============================================================================
--- directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
(original)
+++ directory/studio/trunk/ldapbrowser-ui/src/main/java/org/apache/directory/studio/entryeditors/EntryEditorManager.java
Mon Oct  5 20:56:09 2009
@@ -73,6 +73,7 @@
 import org.eclipse.ui.IWorkbenchPage;
 import org.eclipse.ui.IWorkbenchPart;
 import org.eclipse.ui.IWorkbenchPartReference;
+import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PartInitException;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.plugin.AbstractUIPlugin;
@@ -480,8 +481,12 @@
 
     public void dispose()
     {
-        PlatformUI.getWorkbench().getActiveWorkbenchWindow().getPartService().removePartListener(
partListener );
-        EventRegistry.removeEntryUpdateListener( entryUpdateListener );
+        IWorkbenchWindow ww = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
+        if ( ww != null )
+        {
+            ww.getPartService().removePartListener( partListener );
+            EventRegistry.removeEntryUpdateListener( entryUpdateListener );
+        }
     }
 
 



Mime
View raw message