Fix bug 71330

This commit is contained in:
Oleg Korshul
2024-10-30 16:04:57 +03:00
parent 949aed7bb4
commit a69a992a0d
2 changed files with 2 additions and 5 deletions

View File

@ -1260,7 +1260,7 @@ namespace NSGraphics
else if (NSFile::CFileBinary::Exists(sName + L"emf") && src.find(L"display") == 0)
strImage = sName + L"emf";
MetaFile::IMetaFile* pMetafile = MetaFile::Create(m_pApplicationFonts);
MetaFile::IMetaFile* pMetafile = MetaFile::Create(m_pAppImage->GetFonts());
pMetafile->LoadFromFile(strImage.c_str());
double x = 0, y = 0, w = 0, h = 0;

View File

@ -119,7 +119,6 @@ namespace NSGraphics
CBgraFrame m_oFrame;
private:
NSFonts ::IApplicationFonts* m_pApplicationFonts;
NSGraphics::IGraphicsRenderer* m_pRenderer;
CGrState m_oGrState;
@ -137,12 +136,10 @@ namespace NSGraphics
void Destroy()
{
int w, h;
if (m_pAppImage->GetBits(w, h))
if (m_pAppImage && m_pAppImage->GetBits(w, h))
m_oFrame.put_Data(NULL);
RELEASEINTERFACE(m_pRenderer);
RELEASEINTERFACE(m_pApplicationFonts);
RELEASEOBJECT(m_pAppImage);
}
void EndDraw() {}