Skip to content

Commit 07f8985

Browse files
committed
kms: Fix rare mirroring crash
1 parent 51bf616 commit 07f8985

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/backend/kms/surface/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,15 @@ impl Surface {
287287
let thread_token = evlh
288288
.insert_source(rx2, move |command, _, state| match command {
289289
Event::Msg(SurfaceCommand::SendFrames(sequence)) => {
290+
if output_clone.mirroring().is_some() {
291+
return;
292+
}
290293
state.common.send_frames(&output_clone, Some(sequence));
291294
}
292295
Event::Msg(SurfaceCommand::RenderStates(states)) => {
296+
if output_clone.mirroring().is_some() {
297+
return;
298+
}
293299
state.common.update_primary_output(&output_clone, &states);
294300
let kms = state.backend.kms();
295301
let surface = &mut kms

0 commit comments

Comments
 (0)