d3dx9_36/tests: Fix printing a NULL string

Joerg-Cyril.Hoehle at t-systems.com Joerg-Cyril.Hoehle at t-systems.com
Tue Aug 30 05:44:05 CDT 2011

André Hentschel suggested:
>Should stop the crash on Solaris and maybe others
>-    trace("parent_data = (%p) -> %s\n", parent_data, (char *)parent_data);
>+    trace("parent_data (%p) -> %s\n", parent_data, parent_data ? (char *)parent_data : "(null)");

This is sooo backwards.  You don't want to try and find all places where (null) may be printed.
I remember seeing (null) in logs here and there, so you're telling us that turning on
Wine logs in Solaris can randomly crash Wine because it crashes on printf("%s", NULL)?

I'm very surprised. I thought Solaris was one of the first machines - decades ago - where I observed "(null)" for NULL.
(Or is that really glibc only?)

 Jörg Höhle

More information about the wine-devel mailing list