From 8ce301cc565da389a87d0f450226d2ed245c9088 Mon Sep 17 00:00:00 2001 From: Samuel Newman Date: Mon, 10 Nov 2025 13:29:58 +0200 Subject: [PATCH] add try/catch to avoid fatal crashes --- src/screens/VideoFeed/index.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/screens/VideoFeed/index.tsx b/src/screens/VideoFeed/index.tsx index ad2ff78674..092e681d01 100644 --- a/src/screens/VideoFeed/index.tsx +++ b/src/screens/VideoFeed/index.tsx @@ -57,6 +57,7 @@ import { import {sanitizeDisplayName} from '#/lib/strings/display-names' import {cleanError} from '#/lib/strings/errors' import {sanitizeHandle} from '#/lib/strings/handles' +import {logger} from '#/logger' import {isAndroid} from '#/platform/detection' import {useA11y} from '#/state/a11y' import { @@ -1057,10 +1058,14 @@ function PlayPauseTapArea({ // gets called after a timeout, so guard against being called after unmount -sfn if (!player || !isMounted.current) return doubleTapRef.current = null - if (player.playing) { - player.pause() - } else { - player.play() + try { + if (player.playing) { + player.pause() + } else { + player.play() + } + } catch (err) { + logger.error('Could not toggle play/pause', {safeMessage: err}) } })