Fix null pointer exception on error
Bug: 172923994
Test: internal
Change-Id: I21f60e5f386214216e10a51c22247814ca2f2347
diff --git a/mk2rbc/mk2rbc.go b/mk2rbc/mk2rbc.go
index 317b40d..86e647d 100644
--- a/mk2rbc/mk2rbc.go
+++ b/mk2rbc/mk2rbc.go
@@ -1079,7 +1079,7 @@
if expr.name == "call" {
words = args.SplitN(",", 2)
if words[0].Empty() || !words[0].Const() {
- return ctx.newBadExpr(nil, "cannot handle %s", refDump)
+ return ctx.newBadExpr(node, "cannot handle %s", refDump)
}
expr.name = words[0].Dump()
if len(words) < 2 {