Re: gtk_pixmap_get()



Count Zero <countzero@cyberdeck.org> writes:
> 
> I am doing the following:
> 
> void test(GtkWidget *pixmap) {
> GdkPixmap **gdkpixmap;
> GdkBitmap **gdkbitmap;
> 
> gtk_pixmap_get((GtkPixmap*)pixmap, gdkpixmap, gdkbitmap);
> 
> return;
> }
> 
> and it segfaults everytime
> 

gtk_pixmap_get() stores the pixmap and mask in the locations pointed
to by gdkpixmap and gdkbitmap. Your gdkpixmap and gdkbitmap don't
point anywhere.

The general advice is: learn C before GTK. But, that's no fun, so here
is a solution to this specific problem:

GdkPixmap * gdkpixmap = NULL;
GdkBitmap * gdkbitmap = NULL;
gtk_pixmap_get (GTK_PIXMAP (pixmap), &gdkpixmap, &gdkbitmap);

Havoc





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]