# HG changeset patch # User ib # Date 1299598159 0 # Node ID ad1a232df994eec824dbfa20cb3baf3156cbe384 # Parent 1fa7a299b1b4fd47f8f7e194500c760aae6de2e3 Make slabel work. It is amazing that so far no skin is using a slabel (static label), but the reason is quite simple. Former versions of the GUI crashed when rendering a slabel. The current GUI recognizes the malloc error but can't render the slabel due to (probable) lack of memory. An item that shall be fnt-rendered must have a valid item width. Additionally, a break was missing which caused a slabel that would have been already handled to erroneously run through the dlabel handling as well. diff -r 1fa7a299b1b4 -r ad1a232df994 gui/mplayer/gui_common.c --- a/gui/mplayer/gui_common.c Tue Mar 08 13:15:34 2011 +0000 +++ b/gui/mplayer/gui_common.c Tue Mar 08 15:29:19 2011 +0000 @@ -431,9 +431,12 @@ break; case itSLabel: + if (item->width == -1) + item->width = fntTextWidth(item->fontid, item->label); image = fntRender(item, 0, item->label); if (image) PutImage(image, item->x, item->y, 1, 0); + break; case itDLabel: {