From f68d26b39eead2820d6177a800471fed460de8df Mon Sep 17 00:00:00 2001 From: 156704883 <49087478+156704883@users.noreply.github.com> Date: Fri, 29 Jul 2022 21:24:49 +0800 Subject: [PATCH] delete overlay_; after return; --- DesktopSharing/MainWindow.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DesktopSharing/MainWindow.cpp b/DesktopSharing/MainWindow.cpp index fc93f61..9e0cb19 100644 --- a/DesktopSharing/MainWindow.cpp +++ b/DesktopSharing/MainWindow.cpp @@ -152,6 +152,7 @@ bool MainWindow::Init() if (!ret) { delete overlay_; overlay_ = nullptr; + return false; } overlay_->SetRect(0, 0 + video_height_, video_width_, kMinOverlayHeight); @@ -323,4 +324,4 @@ void MainWindow::StopLive(int event_type) else if (event_type == EVENT_TYPE_RTMP_PUSHER) { ScreenLive::Instance().StopLive(SCREEN_LIVE_RTMP_PUSHER); } -} \ No newline at end of file +}