Commit abed9d1
committed
Cancel probe worker and copy QImage
Ensure the probe worker is cleanly stopped when shutting down: call request_cancel(), wait (up to 1500ms), and clear the _probe_worker reference to avoid dangling threads. Also make a copy of the QImage created from the frame buffer (QImage(...).copy()) so the Qt image doesn't reference the underlying frame memory, preventing use-after-free crashes or visual corruption.1 parent 4404f78 commit abed9d1
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1662 | 1662 | | |
1663 | 1663 | | |
1664 | 1664 | | |
| 1665 | + | |
| 1666 | + | |
| 1667 | + | |
| 1668 | + | |
| 1669 | + | |
| 1670 | + | |
| 1671 | + | |
1665 | 1672 | | |
1666 | 1673 | | |
1667 | 1674 | | |
| |||
2027 | 2034 | | |
2028 | 2035 | | |
2029 | 2036 | | |
2030 | | - | |
| 2037 | + | |
2031 | 2038 | | |
2032 | 2039 | | |
2033 | 2040 | | |
| |||
0 commit comments