mirror of
https://github.com/Genymobile/scrcpy.git
synced 2025-04-19 19:15:08 +00:00
Fix segfault on close with --no-video
Do not call sc_screen_hide_window() if screen is not initialized.
To reproduce:
scrcpy --no-video --record=file.mp4
This only segfaults in debug mode since commit
fd0f432e87
.
This commit is contained in:
parent
bf625790fa
commit
aa34d63171
1 changed files with 6 additions and 3 deletions
|
@ -805,9 +805,12 @@ scrcpy(struct scrcpy_options *options) {
|
|||
ret = event_loop(s);
|
||||
LOGD("quit...");
|
||||
|
||||
// Close the window immediately on closing, because screen_destroy() may
|
||||
// only be called once the video demuxer thread is joined (it may take time)
|
||||
sc_screen_hide_window(&s->screen);
|
||||
if (options->video_playback) {
|
||||
// Close the window immediately on closing, because screen_destroy()
|
||||
// may only be called once the video demuxer thread is joined (it may
|
||||
// take time)
|
||||
sc_screen_hide_window(&s->screen);
|
||||
}
|
||||
|
||||
end:
|
||||
if (timeout_started) {
|
||||
|
|
Loading…
Add table
Reference in a new issue