[PATCH] KFontChooser crashes when changing to fixed fonts

Thomas McGuire Thomas.McGuire at gmx.net
Sun Feb 24 13:30:59 GMT 2008


Hi,

On Sunday 24 February 2008, Ingo Klöcker wrote:
> On Saturday 23 February 2008, Chusslove Illich wrote:
> > > [: Thomas McGuire :]
> > > The reason is in setFamilyBoxItems() [...] causes a signal to be
> > > emitted and then _k_family_chosen_slot() is called [...] will
> > > crash.
> >
> > Nothing ought to react during setFamilyBoxItems() itself, as it is
> > just an initialization step for setting up the display, and family
> > selection etc. is always performed afterwards (in setupDisplay(),
> > which setFont() calls at the end). The attached patch should be more
> > according to this description. (Or, switching off the passive voice:
> > I screwed up :)
> >
> > Does it also fix the issue for you?
>
> Even if this patch fixes the issue it would be wise to add an assert
> (for the debug build) on familyListBox->currentItem() (and a
> corresponding comment) to make sure that a regression is noticed early
> and easily.
>
> Moreover, I'd still apply Thomas patch. It's nice that
> familyListBox->currentItem() should never by NULL, but better safe than
> sorry.
OK, done. Chusslove applied his patch and I added the assert and the check for 
the item being 0.

Regards,
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080224/4b54e142/attachment.sig>


More information about the kde-core-devel mailing list