Skip to content

Commit ea7604d

Browse files
author
xia ning
authored
Merge pull request #113 from AgoraIO/dev/win-crash
update screen crash
2 parents 1735c22 + 5cad3eb commit ea7604d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

windows/APIExample/APIExample/Advanced/ScreenShare/AgoraScreenCapture.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,9 @@ void CAgoraScreenCapture::GetCaptureParameterFromCtrl(agora::rtc::ScreenCaptureP
479479
else
480480
capParam.frameRate = _ttoi(str);
481481
HWND hWnd = NULL;
482-
hWnd = m_listWnd.GetAt(m_listWnd.FindIndex(m_cmbScreenCap.GetCurSel()));
482+
if (m_cmbScreenCap.GetCurSel() > 0)
483+
hWnd = m_listWnd.GetAt(m_listWnd.FindIndex(m_cmbScreenCap.GetCurSel()));
484+
capParam.excludeWindowList = (view_t*)hWnd;
483485
capParam.excludeWindowList = (view_t*)hWnd;
484486
capParam.windowFocus = m_chkWndFocus.GetCheck();
485487
capParam.excludeWindowCount = 1;

0 commit comments

Comments
 (0)