On 01/10/12 01:02, bioinfornatics wrote: > Dear i do not understand why the first example works and the second > segfault. Thanks > > ----------------EXAMPLE 1 ------------------- Display* display = XOpenDisplay(getenv("DISPLAY"));
> char** fonts = XListFonts( display, pattern.dup.ptr, 10, &counter > ----------------EXAMPLE 2 ------------------- > Display display = *XOpenDisplay(getenv("DISPLAY")); > char** fonts = XListFonts( &display, pattern.dup.ptr, 10, &counter Do you expect the xlib functions to work with copies of private structures? artur