[Mono-devel-list] patch for crash in locales.c (on cygwin), second try
Urs Muff
umuff at QUARK.com
Wed Apr 21 17:46:45 EDT 2004
Index: locales.c
===================================================================
RCS file: /cvs/public/mono/mono/metadata/locales.c,v
retrieving revision 1.16
diff -u -r1.16 locales.c
--- locales.c 21 Apr 2004 14:58:37 -0000 1.16
+++ locales.c 21 Apr 2004 21:08:17 -0000
@@ -1434,10 +1434,10 @@
#endif
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION ": LCID is %d", cult->lcid);
+ g_message (G_GNUC_PRETTY_FUNCTION ": LCID is %d", cult == NULL ? -1
: cult->lcid);
#endif
- if(cult->lcid==0x007F) {
+ if(cult == NULL || cult->lcid==0x007F) {
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": Invariant, using shortcut");
@@ -1503,10 +1503,10 @@
#endif
#ifdef DEBUG
- g_message (G_GNUC_PRETTY_FUNCTION ": LCID is %d", cult->lcid);
+ g_message (G_GNUC_PRETTY_FUNCTION ": LCID is %d", cult == NULL ? -1
: cult->lcid);
#endif
- if(cult->lcid==0x007F) {
+ if(cult == NULL || cult->lcid==0x007F) {
#ifdef DEBUG
g_message (G_GNUC_PRETTY_FUNCTION
": Invariant, using shortcut");
@@ -1567,7 +1567,7 @@
MONO_ARCH_SAVE_REGS;
- if(cult->lcid==0x007F) {
+ if(cult == NULL || cult->lcid==0x007F) {
/* Invariant shortcut */
return g_unichar_toupper (c);
}
@@ -1599,7 +1599,7 @@
MONO_ARCH_SAVE_REGS;
- if(cult->lcid==0x007F) {
+ if(cult == NULL || cult->lcid==0x007F) {
/* Invariant shortcut */
return g_unichar_tolower (c);
}
More information about the Mono-devel-list
mailing list