diff --git a/v2/goi18n/extract_command.go b/v2/goi18n/extract_command.go
index <HASH>..<HASH> 100644
--- a/v2/goi18n/extract_command.go
+++ b/v2/goi18n/extract_command.go
@@ -259,6 +259,9 @@ func extractStringLiteral(expr ast.Expr) (string, bool) {
 		}
 		return x + y, true
 	case *ast.Ident:
+		if v.Obj == nil {
+			return "", false
+		}
 		switch z := v.Obj.Decl.(type) {
 		case *ast.ValueSpec:
 			s, ok := extractStringLiteral(z.Values[0])
diff --git a/v2/goi18n/extract_command_test.go b/v2/goi18n/extract_command_test.go
index <HASH>..<HASH> 100644
--- a/v2/goi18n/extract_command_test.go
+++ b/v2/goi18n/extract_command_test.go
@@ -202,6 +202,18 @@ zero = "Zero translation"
 			activeFile: []byte(`ConstantID = "ID is a constant"
 `),
 		},
+		{
+			name:     "undefined identifier in composite lit",
+			fileName: "file.go",
+			file: `package main
+
+			import "github.com/nicksnyder/go-i18n/v2/i18n"
+
+			var m = &i18n.LocalizeConfig{
+				Funcs: Funcs,
+			}
+			`,
+		},
 	}
 
 	for _, test := range tests {
Add a nil pointer check before dereferencing an identifier's Obj (#<I>)

When walking the AST during extraction, if an identifier in a composite

literal is encountered that does not define in that file, the `Obj`

field of the `ast.Ident` will be nil.



Rather than panicking in this case, have the literal string extraction

function return false (no string found).



Also, add a test case representing this scenario.