Re: [UFO-devel] Invalid memory access in ufo::UTextWidget
Status: Beta
Brought to you by:
schmidtjf
From: Johannes S. <sch...@us...> - 2005-07-20 10:15:27
|
Am Mittwoch 20 Juli 2005 07:22 schrieb Andreas Beckermann: > Hi > The c'tor of ufo::UTextWidget calls setContentType() which in turn calls > setDocument(), which has a line > getTextModel()->document = m_doc; > > However getTextModel() casts m_model into a ufo::UTextModel, but at the > beginning of the c'tor m_model is just a ufo::UWidgetModel. Only a few > lines later m_model is set to a ufo::UTextModel. > > The attached patch fixes the problem, but is not very nice: I the fact that > m_doc is NULL only, if called from the c'tor. Many thanks. I have applied a different patch which creates the text model right at the beginning of the c'tor (similar to other widgets). Regards, Johannes |