Hi world, 

I have a problem loading pixbufs using gdk_pixbuf_new_from_file()
function. Following code results in segmentation fault: 

/* begin */
char buf[64]; 
GdkPixbuf *p; 
GError **err; 

strcpy(buf, "/tmp/image.png"); 
p = gdk_pixbuf_new_from_file(buf, err); 
/* end of code */

On the contrary, following code works right as rain: 

/* begin */
GdkPixbuf *p; 
GError **err; 

p = \
gdk_pixbuf_new_from_file(gtk_file_selection_get_filename(GTK_FILE_SELECTION(fsel),\ 
err);
/* end of code */

I think I have messed up some of the variable and return values types,
but I can't seem to solve it by myself.
Can anybody help/flame me about what am I doing wrong, please?

-- 
Andrej "Ticho" Kacian       mailto:[EMAIL PROTECTED]

"Don't forget that MS-Windows is just a temporary
 workaround until you can switch to a GNU system."
                                      -GnuPG creators

_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to