Re: Font allocation segfaults?



Peter-Frank Spierenburg <peter@cs.dal.ca> writes:
> What am I doing wrong?
> 
> gchar *font_name =
> "-*-helvetica-bold-r-normal--*-120-*-*-*-*-iso8859-1";
> GdkFont *font = gdk_font_load(font_name);
> 
> this segfaults.
>

The only way this might segfault is with binary-incompatible libraries
or maybe you didn't call gtk_init(). 

Perhaps you mean that it segfaults later on, maybe the font doesn't
load so that font == NULL.

Anyway, no point in guessing; get a backtrace from gdb.

Havoc




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