From c00f6915de20e963dd69cc158c07ccbb54935e4a Mon Sep 17 00:00:00 2001 From: Ilya Laktyushin Date: Fri, 31 Jul 2020 16:34:49 +0300 Subject: [PATCH] Fix animated sticker seek when adding to a photo --- .../LegacyComponents/Sources/TGPhotoPaintController.m | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/submodules/LegacyComponents/Sources/TGPhotoPaintController.m b/submodules/LegacyComponents/Sources/TGPhotoPaintController.m index abf25402a4..06583aa272 100644 --- a/submodules/LegacyComponents/Sources/TGPhotoPaintController.m +++ b/submodules/LegacyComponents/Sources/TGPhotoPaintController.m @@ -1223,8 +1223,10 @@ const CGFloat TGPhotoPaintStickerKeyboardSize = 260.0f; NSTimeInterval currentTime = editorController.currentTime; __strong TGPhotoStickerEntityView *strongStickerView = weakStickerView; if (strongStickerView != nil) { - [strongStickerView seekTo:currentTime]; - [strongStickerView play]; + if (!isnan(currentTime)) { + [strongStickerView seekTo:currentTime]; + [strongStickerView play]; + } } } };