fix: crash on source capture with empty thumbnail size (#47652)
Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
parent
9184541193
commit
a425ddd08e
1 changed files with 4 additions and 2 deletions
|
@ -236,7 +236,8 @@ DesktopCapturer::DesktopListListener::~DesktopListListener() = default;
|
||||||
|
|
||||||
void DesktopCapturer::DesktopListListener::OnDelegatedSourceListSelection() {
|
void DesktopCapturer::DesktopListListener::OnDelegatedSourceListSelection() {
|
||||||
if (have_thumbnail_) {
|
if (have_thumbnail_) {
|
||||||
std::move(update_callback_).Run();
|
content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
|
||||||
|
std::move(update_callback_));
|
||||||
} else {
|
} else {
|
||||||
have_selection_ = true;
|
have_selection_ = true;
|
||||||
}
|
}
|
||||||
|
@ -249,7 +250,8 @@ void DesktopCapturer::DesktopListListener::OnSourceThumbnailChanged(int index) {
|
||||||
have_selection_ = false;
|
have_selection_ = false;
|
||||||
|
|
||||||
// PipeWire returns a single source, so index is not relevant.
|
// PipeWire returns a single source, so index is not relevant.
|
||||||
std::move(update_callback_).Run();
|
content::GetUIThreadTaskRunner({})->PostTask(FROM_HERE,
|
||||||
|
std::move(update_callback_));
|
||||||
} else {
|
} else {
|
||||||
have_thumbnail_ = true;
|
have_thumbnail_ = true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue