# HG changeset patch # User timkelly # Date 1260908731 21600 # Node ID b32168b846ac95b5cb6d4726a026cbad0630d6b1 # Parent 27108441f6d86005bb67837c45a5e07ba47cfec3 fix bug 10386 (mrege from CDT 6.0.1 HEAD) diff -r 27108441f6d8 -r b32168b846ac cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob.java --- a/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob.java Fri Dec 04 16:14:47 2009 -0600 +++ b/cdt/cdt_6_0_x/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/OpenDeclarationsJob.java Tue Dec 15 14:25:31 2009 -0600 @@ -377,8 +377,14 @@ } private boolean isSameName(IName n1, IName n2) { + if (n1 == n2) + return true; + IASTFileLocation loc1 = n1.getFileLocation(); IASTFileLocation loc2 = n2.getFileLocation(); + if (loc1 == null || loc2 == null){ + return false; + } return loc1.getFileName().equals(loc2.getFileName()) && loc1.getNodeOffset() == loc2.getNodeOffset() && loc1.getNodeLength() == loc2.getNodeLength();