1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-29 11:13:34 +02:00

fixed NPE

This commit is contained in:
David Inglis 2002-11-29 15:31:44 +00:00
parent 2ef1e13e0b
commit 75222a1dcf

View file

@ -180,7 +180,7 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
return; return;
} }
IResource resource = event.getResource(); IResource resource = event.getResource();
if (resource.getType() == IResource.PROJECT) { if (resource != null && resource.getType() == IResource.PROJECT) {
if (event.getType() == IResourceChangeEvent.PRE_DELETE || event.getType() == IResourceChangeEvent.PRE_CLOSE) { if (event.getType() == IResourceChangeEvent.PRE_DELETE || event.getType() == IResourceChangeEvent.PRE_CLOSE) {
fConsoleDocumentMap.remove(resource); fConsoleDocumentMap.remove(resource);
Object[] list = listeners.getListeners(); Object[] list = listeners.getListeners();