Re: [Gtk2forpascal-devel] Problem with PGdkPixbufLoader
Brought to you by:
mgaertner
From: <wan...@ya...> - 2004-06-08 03:56:36
|
Yes, it works. Thanks you so much, I learnt the knowledge from you. Best regards, --- Jeff Pohlmeyer <yet...@ya...> 的正文:> > In the following program, the "if" block is > exactly > > the same as the "else" block except that in the > "if" > > block gdk_pixbuf_loader_get_pixbuf() is put into > > getImage() function. > > > Variables on the heap (global) are initialized to > NIL; > but variables on the stack (local) are not > initialized, > they usually contain random garbage from > who-knows-what. > > > That is why you get the: > assertion `error == NULL || *error == NULL' > failed > > from the local "error" but not the global. > > > Try this... > > function getImage(loader:PGdkPixbufLoader; var > s:string):boolean; > var > error : pgerror; > begin > error:=nil; // <-- ADD THIS LINE !!! > result := > gdk_pixbuf_loader_write(loader,@(s[1]),length(s),@error); > end;//getImage() > > > > Hope this helps, > > - Jeff > > > > > > > __________________________________ > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger. > http://messenger.yahoo.com/ > > > ------------------------------------------------------- > This SF.Net email is sponsored by: GNOME Foundation > Hackers Unite! GUADEC: The world's #1 Open Source > Desktop Event. > GNOME Users and Developers European Conference, > 28-30th June in Norway > http://2004/guadec.org > _______________________________________________ > Gtk2forpascal-devel mailing list > Gtk...@li... > https://lists.sourceforge.net/lists/listinfo/gtk2forpascal-devel _________________________________________________________ Do You Yahoo!? 嫌邮箱太小?雅虎电邮自助扩容! http://cn.rd.yahoo.com/mail_cn/tag/10m/*http://cn.mail.yahoo.com/event/10m.html |