7129802 xterm dumps core on X servers without SolarisIA extension
authorAlan Coopersmith <Alan.Coopersmith@Oracle.COM>
Fri, 13 Jan 2012 19:33:22 -0800
changeset 1236 3592c0ee5e0b
parent 1235 4198473e749e
child 1237 a021cc7bce88
7129802 xterm dumps core on X servers without SolarisIA extension
open-src/lib/libX11/sun-src/src/XInteractive.c
--- a/open-src/lib/libX11/sun-src/src/XInteractive.c	Tue Jan 03 12:57:29 2012 -0800
+++ b/open-src/lib/libX11/sun-src/src/XInteractive.c	Fri Jan 13 19:33:22 2012 -0800
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1993, 2006, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1993, 2012, Oracle and/or its affiliates. All rights reserved.
  *
  * Permission is hereby granted, free of charge, to any person obtaining a
  * copy of this software and associated documentation files (the "Software"),
@@ -172,8 +172,10 @@
     di->codes = XInitExtension(dpy, ia_extension_name);
     di->next = iaExtDisplayList;
     iaExtDisplayList = di;
-    XESetCloseDisplay(dpy, di->codes->extension, ia_close_display);
-    XESetErrorString(dpy, di->codes->extension, ia_error_string);
+    if (di->codes) { /* if the server has the extension */
+	XESetCloseDisplay(dpy, di->codes->extension, ia_close_display);
+	XESetErrorString(dpy, di->codes->extension, ia_error_string);
+    }
     return di;
 }