mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 06:01:12 +00:00
Fix surface leak if SDLVideo_CreateOverlay() fails
This commit is contained in:
@@ -193,6 +193,7 @@ void SLVideoDecoder::notifyOverlayUpdated(Overlay::OverlayType type)
|
|||||||
if (m_Overlay == nullptr) {
|
if (m_Overlay == nullptr) {
|
||||||
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION,
|
||||||
"SLVideo_CreateOverlay() failed");
|
"SLVideo_CreateOverlay() failed");
|
||||||
|
SDL_FreeSurface(newSurface);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user