diff --git a/src/g2html/Loc.java b/src/g2html/Loc.java
index cf570c2..9ce0c49 100644
--- a/src/g2html/Loc.java
+++ b/src/g2html/Loc.java
@@ -48,7 +48,7 @@ static public void parseLocNode(XMLStreamReader parser, Result res, ResultStats
while(readcc.hasNext()){
int eventType = readcc.getEventType();
// add function name to the loc xml-node
- if (eventType==XMLStreamConstants.START_ELEMENT && readcc.getLocalName()=="loc"){
+ if (eventType==XMLStreamConstants.START_ELEMENT && readcc.getLocalName() != null && readcc.getLocalName().equals("loc")){
String funName = fileStats.getNodeFun(id);
if (null==funName) {
lostAndFound.append(id+"\n");