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 (event.getType() == IResourceChangeEvent.PRE_DELETE || event.getType() == IResourceChangeEvent.PRE_CLOSE) {
|
||||
IDocumentPartitioner partioner = (IDocumentPartitioner)fConsoleMap.remove(resource);
|
||||
partioner.disconnect();
|
||||
Object[] list = listeners.getListeners();
|
||||
if (list.length > 0) {
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
IBuildConsoleListener listener = (IBuildConsoleListener)list[i];
|
||||
ConsoleEvent consoleEvent = new ConsoleEvent(this, (IProject)resource, ConsoleEvent.CONSOLE_CLOSE);
|
||||
listener.consoleChange(consoleEvent);
|
||||
if (partioner != null) {
|
||||
partioner.disconnect();
|
||||
Object[] list = listeners.getListeners();
|
||||
if (list.length > 0) {
|
||||
for (int i = 0; i < list.length; i++) {
|
||||
IBuildConsoleListener listener = (IBuildConsoleListener)list[i];
|
||||
ConsoleEvent consoleEvent = new ConsoleEvent(this, (IProject)resource, ConsoleEvent.CONSOLE_CLOSE);
|
||||
listener.consoleChange(consoleEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue