Bugs item #2997202, was opened at 2010-05-05 21:06
Message generated for change (Tracker Item Submitted) made by dgap323s
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=462816&aid=2997202&group_id=51305
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxpdfdoc
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: jaxon (dgap323s)
Assigned to: Nobody/Anonymous (nobody)
Summary: crash in wxPdfFont copy constructor if using encodings
Initial Comment:
copy constructor in pdffont.cpp should look like this, or it crashes if copying
font with non-null encoding:
[code]
wxPdfFont::wxPdfFont(const wxPdfFont& font)
: m_embed(font.m_embed), m_subset(font.m_subset),
m_fontStyle(font.m_fontStyle),
m_fontData(font.m_fontData), m_encoding(NULL)
{
if (m_fontData != NULL)
{
m_fontData->IncrementRefCount();
}
if (font.m_encoding != NULL)
{
if (m_encoding == NULL) // here was the error, we must create new
wxPdfEncoding if it IS null
{
m_encoding = new wxPdfEncoding();
}
*m_encoding = *(font.m_encoding);
}
}
[/code]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=462816&aid=2997202&group_id=51305
------------------------------------------------------------------------------
_______________________________________________
wxCode-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wxcode-users