Author: dgeraskov
Date: 2012-08-02 10:34:25 -0400 (Thu, 02 Aug 2012)
New Revision: 42841
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java
Log:
Fix NPE
Modified:
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java
===================================================================
---
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java 2012-08-02
14:03:11 UTC (rev 42840)
+++
trunk/hibernatetools/plugins/org.hibernate.eclipse.console/src/org/hibernate/eclipse/console/views/DynamicSQLPreviewView.java 2012-08-02
14:34:25 UTC (rev 42841)
@@ -214,8 +214,10 @@
public void dispose() {
IWorkbenchWindow window = PlatformUI.getWorkbench()
.getActiveWorkbenchWindow();
- IPartService service = window.getPartService();
- service.removePartListener(partListener);
+ if (window != null){
+ IPartService service = window.getPartService();
+ service.removePartListener(partListener);
+ }
docSetupParticipant.unsetup();
super.dispose();
}
Show replies by date