Hi,
I have been using gbuffy for a while and I fixed a problem I
had with it awhile back but never passed it along. And until I just
restaged my machine I had forgotten that I had fixed this.
The problem is when you receive a email with no Subject, I get these a
lot from cronjobs that I run. And I would get this error when I would
left click on the gbuffy window:
Gdk-CRITICAL **: file gdkdraw.c: line 215 (gdk_draw_string): assertion
`string != NULL' failed.
This is more annoying then anything else. Anyway my fix was very
simple check to see if m->subject was NULL before calling
gdk_draw_string.
Here is the patch file for gbuffy.c
Thanks for writing Gbuffy.
-Scott
~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~
Scott Stonefield www.flynnstone.com
srs@...
------------------ gbuffy.patch --------------------------------
*** gbuffy.c.orig Mon May 14 20:47:35 2001
--- gbuffy.c Tue Dec 18 12:05:33 2001
***************
*** 233,242 ****
da->style->fg_gc[GTK_WIDGET_STATE (da)], x, y + (face_display * 3),
m->from);
y += box->height;
! gdk_draw_string (box->pixmap, da->style->font,
! da->style->fg_gc[GTK_WIDGET_STATE (da)], x, y + (face_display * 3),
! m->subject);
! y += box->height;
if (face_display)
y += box->height;
gdk_draw_line (box->pixmap, da->style->dark_gc[GTK_WIDGET_STATE (da)],
--- 233,249 ----
da->style->fg_gc[GTK_WIDGET_STATE (da)], x, y + (face_display * 3),
m->from);
y += box->height;
!
! /* First check to see if we actually have a subject to print.
! if so then print the subject with the From line. If not Skip.
! */
! if ( m->subject != NULL ) {
! gdk_draw_string (box->pixmap, da->style->font,
! da->style->fg_gc[GTK_WIDGET_STATE (da)],
! x, y + (face_display * 3), m->subject);
! y += box->height;
! }
!
if (face_display)
y += box->height;
gdk_draw_line (box->pixmap, da->style->dark_gc[GTK_WIDGET_STATE (da)],