Skip to content

Commit

Permalink
Merge pull request #13999 from garbear/rp-fix-memleak
Browse files Browse the repository at this point in the history
RetroPlayer: Fix memory leak on Windows
  • Loading branch information
garbear committed Jun 10, 2018
2 parents 5da94d1 + 65abf74 commit e4a4364
Showing 1 changed file with 8 additions and 5 deletions.
Expand Up @@ -141,13 +141,16 @@ bool CWinRenderBuffer::UploadTexture()

bool CWinRenderBuffer::CreateScalingContext()
{
m_swsContext = sws_getContext(m_width, m_height, m_pixFormat, m_width, m_height, m_targetPixFormat,
SWS_FAST_BILINEAR, NULL, NULL, NULL);

if (m_swsContext == nullptr)
{
CLog::Log(LOGERROR, "WinRenderer: Failed to create swscale context");
return false;
m_swsContext = sws_getContext(m_width, m_height, m_pixFormat, m_width, m_height, m_targetPixFormat,
SWS_FAST_BILINEAR, NULL, NULL, NULL);

if (m_swsContext == nullptr)
{
CLog::Log(LOGERROR, "WinRenderer: Failed to create swscale context");
return false;
}
}

return true;
Expand Down

0 comments on commit e4a4364

Please sign in to comment.