mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Fix segfault on rotation while recording
The packet sink push_session() callback is optional, but it was called
unconditionnally even when not implemented, leading to a segfault.
Bug introduced by commit 78cba1b7c2.
Fixes #6687 <https://github.com/Genymobile/scrcpy/issues/6687>
This commit is contained in:
parent
23710e04c1
commit
f91fa56593
1 changed files with 2 additions and 1 deletions
|
|
@ -67,7 +67,8 @@ sc_packet_source_sinks_push_session(struct sc_packet_source *source,
|
|||
assert(source->sink_count);
|
||||
for (unsigned i = 0; i < source->sink_count; ++i) {
|
||||
struct sc_packet_sink *sink = source->sinks[i];
|
||||
if (!sink->ops->push_session(sink, session)) {
|
||||
if (sink->ops->push_session
|
||||
&& !sink->ops->push_session(sink, session)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue