GNOME Bugzilla – Bug 75925
gtk_curve_set_curve_type() will abort the process if called at the wrong time
Last modified: 2004-12-22 21:47:04 UTC
gtk_curve_set_curve_type() will generally result in a call to gtk_curve_interpolate(). neither function checks to see if the widget has been sized yet. as a result, if gtk_curve_set_type() is called during widget initialization, the call to gtk_curve_interpolate() finds itself using a width of -1. This leads the following call: g_malloc (width * sizeof (foo)) to attempt to allocate -20 bytes, which aborts the program. the documentation for gtk_curve_set_type() should either indicate that it cannot be called till the curve has been realized, or better, the functions should check on the current status of the widget and act accordingly.
*** This bug has been marked as a duplicate of 57012 ***