1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-24 16:53:50 +02:00

[187061] Fix NPE Renaming Connections from Remote System Details View

This commit is contained in:
Martin Oberhuber 2007-05-15 21:15:39 +00:00
parent 7217c7516a
commit 6b12e6b899

View file

@ -4365,8 +4365,12 @@ public class SystemView extends SafeTreeViewer
// looking for are not to be found within this branch... // looking for are not to be found within this branch...
// ----------------------------------------------------------------------------------------- // -----------------------------------------------------------------------------------------
else if (rawData instanceof IHost) { else if (rawData instanceof IHost) {
if (subsystem==null) {
return occurrences; //bug 187061: renaming a host has no subsystem associated, therefore no other matches to rename
}
IHost currConn = (IHost) rawData; IHost currConn = (IHost) rawData;
if (!currConn.getHostName().equals(subsystem.getHost().getHostName())) return occurrences; // they don't match, so don't bother checking the kids if (!currConn.getHostName().equals(subsystem.getHost().getHostName()))
return occurrences; // they don't match, so don't bother checking the kids
} }
// skip the new connection prompts... // skip the new connection prompts...
else if (rawData instanceof ISystemPromptableObject) else if (rawData instanceof ISystemPromptableObject)