mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-08 12:18:50 +02:00
[FEThumbnails]Add cleanup code to avoid locking files (#32108)
This commit is contained in:
@@ -183,6 +183,12 @@ IFACEMETHODIMP GcodeThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure releasing the stream (not all if branches contain it)
|
||||||
|
if (m_pStream)
|
||||||
|
{
|
||||||
|
m_pStream->Release();
|
||||||
|
m_pStream = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -182,6 +182,13 @@ IFACEMETHODIMP PdfThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure releasing the stream (not all if branches contain it)
|
||||||
|
if (m_pStream)
|
||||||
|
{
|
||||||
|
m_pStream->Release();
|
||||||
|
m_pStream = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -183,6 +183,12 @@ IFACEMETHODIMP QoiThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure releasing the stream (not all if branches contain it)
|
||||||
|
if (m_pStream)
|
||||||
|
{
|
||||||
|
m_pStream->Release();
|
||||||
|
m_pStream = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,6 +181,13 @@ IFACEMETHODIMP StlThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure releasing the stream (not all if branches contain it)
|
||||||
|
if (m_pStream)
|
||||||
|
{
|
||||||
|
m_pStream->Release();
|
||||||
|
m_pStream = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -182,6 +182,13 @@ IFACEMETHODIMP SvgThumbnailProvider::GetThumbnail(UINT cx, HBITMAP* phbmp, WTS_A
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ensure releasing the stream (not all if branches contain it)
|
||||||
|
if (m_pStream)
|
||||||
|
{
|
||||||
|
m_pStream->Release();
|
||||||
|
m_pStream = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user