m_TextCount = src.m_TextCount;
if (m_TextCount) {
m_pTextList = FX_Alloc(CPDF_TextObject*, m_TextCount);
- FXSYS_memset32(m_pTextList, 0, sizeof(CPDF_TextObject*) * m_TextCount);
for (int i = 0; i < m_TextCount; i ++) {
if (src.m_pTextList[i]) {
m_pTextList[i] = FX_NEW CPDF_TextObject;
if (text_count) {
m_TextCount = text_count;
m_pTextList = FX_Alloc(CPDF_TextObject*, text_count);
- FXSYS_memset32(m_pTextList, 0, sizeof(void*) * text_count);
}
}
CPDF_Rect CPDF_ClipPath::GetClipBox() const
CPDF_ClipPathData* pData = GetModify();
if (pData->m_TextCount + count > FPDF_CLIPPATH_MAX_TEXTS) {
for (int i = 0; i < count; i ++) {
- pTexts[i]->Release();
+ if (pTexts[i])
+ pTexts[i]->Release();
}
return;
}
FX_POSITION pos = pGS->GetStartPos();
while (pos) {
CFX_ByteString key_str;
- CPDF_Object* pObject = pGS->GetNextElement(pos, key_str)->GetDirect();
+ CPDF_Object* pElement = pGS->GetNextElement(pos, key_str);
+ CPDF_Object* pObject = pElement ? pElement->GetDirect() : NULL;
if (pObject == NULL) {
continue;
}
}
CPDF_ContentMarkItem::~CPDF_ContentMarkItem()
{
- if (m_ParamType == DirectDict) {
+ if (m_ParamType == DirectDict && m_pParam) {
((CPDF_Dictionary*)m_pParam)->Release();
}
}