* Schevon, Catherine <[EMAIL PROTECTED]> [060208 20:33]:
> I have been using Xpm routines to read pixmap data from a file.  The
> example given here focuses on the XpmReadFiletoPixmap, but every
> function that involved reading a pixmap file triggered the bug.
> 
>       Pixmap *pixmap, *shape;
> [...]
>       XpmReadFileToPixmap (display, window, xpmfile, pixmap, shape /*
> or NULL */, NULL);

pixmap and shape are return values, thus you tell it to return the
values to what those pointers point to, but you have not initialized the
pointers, which simply can (but do not have to when you overwrite
something non-interesting) go harvok.
The code has to be:
        Pixmap pixmap, shape;
        ...
        XpmReadFileToPixmap(display, window, xpmfile, &pixmap, &shape,
                        NULL)

Hochachtungsvoll,
  Bernhard R. Link



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to