--- a/jdk/src/share/back/error_messages.c Sun Dec 02 16:37:31 2012 +0000
+++ b/jdk/src/share/back/error_messages.c Sun Dec 02 19:16:56 2012 -0500
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -70,8 +70,13 @@
len = (int)strlen((char*)utf8buf);
/* Convert to platform encoding (ignore errors, dangerous area) */
- (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf,
- utf8buf, len, pbuf, MAX_MESSAGE_LEN);
+ if (gdata->npt != NULL) {
+ (void)(gdata->npt->utf8ToPlatform)(gdata->npt->utf,
+ utf8buf, len, pbuf, MAX_MESSAGE_LEN);
+ } else {
+ /* May be called before NPT is initialized so don't fault */
+ strncpy(pbuf, (char*)utf8buf, len);
+ }
(void)fprintf(fp, "%s%s%s", prefix, pbuf, suffix);
}