mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fixed NPE
This commit is contained in:
parent
d537a34599
commit
515919579d
1 changed files with 9 additions and 7 deletions
|
@ -132,13 +132,15 @@ public class BuildConsoleManager implements IBuildConsoleManager, IResourceChang
|
||||||
if (resource != null && 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) {
|
||||||
IDocumentPartitioner partioner = (IDocumentPartitioner)fConsoleMap.remove(resource);
|
IDocumentPartitioner partioner = (IDocumentPartitioner)fConsoleMap.remove(resource);
|
||||||
partioner.disconnect();
|
if (partioner != null) {
|
||||||
Object[] list = listeners.getListeners();
|
partioner.disconnect();
|
||||||
if (list.length > 0) {
|
Object[] list = listeners.getListeners();
|
||||||
for (int i = 0; i < list.length; i++) {
|
if (list.length > 0) {
|
||||||
IBuildConsoleListener listener = (IBuildConsoleListener)list[i];
|
for (int i = 0; i < list.length; i++) {
|
||||||
ConsoleEvent consoleEvent = new ConsoleEvent(this, (IProject)resource, ConsoleEvent.CONSOLE_CLOSE);
|
IBuildConsoleListener listener = (IBuildConsoleListener)list[i];
|
||||||
listener.consoleChange(consoleEvent);
|
ConsoleEvent consoleEvent = new ConsoleEvent(this, (IProject)resource, ConsoleEvent.CONSOLE_CLOSE);
|
||||||
|
listener.consoleChange(consoleEvent);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue