diff options
author | rcombs <rcombs@rcombs.me> | 2021-03-26 02:32:49 -0500 |
---|---|---|
committer | rcombs <rcombs@rcombs.me> | 2022-09-14 16:28:12 -0500 |
commit | 588cb9a977c0ec4f278b827a67d7b46b84573057 (patch) | |
tree | 645034430c60673ce99d165de8ad1625e215cd62 /RELEASE_NOTES | |
parent | 750b58a5a37755972f3b34692eb9852354e8f077 (diff) | |
download | mpv-588cb9a977c0ec4f278b827a67d7b46b84573057.tar.bz2 mpv-588cb9a977c0ec4f278b827a67d7b46b84573057.tar.xz |
mac: avoid unnecessary unsafe conversions; fixes crash in debug builds
Previously, running a debug build of mpv would crash with this output
when preinit() at vo_libmpv.c:732 calls control(vo, VOCTRL_PREINIT, NULL):
Swift/Optional.swift:247: Fatal error: unsafelyUnwrapped of nil optional
This comes from this line of code:
var data = UnsafeMutableRawPointer.init(bitPattern: 0).unsafelyUnwrapped
Unsafely unwrapping a UnsafeMutableRawPointer.init has always been UB,
but the Swift runtime began asserting on it in debug builds a couple macOS
versions ago.
Diffstat (limited to 'RELEASE_NOTES')
0 files changed, 0 insertions, 0 deletions