From 42e6281e9b72a31d24fc973c96542df79e2e1a1f Mon Sep 17 00:00:00 2001 From: William Casarin Date: Thu, 30 Mar 2023 15:41:10 -0400 Subject: [PATCH] Fix crash when reposting Changelog-Fixed: Fix crash when reposting --- damus/ContentView.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/damus/ContentView.swift b/damus/ContentView.swift index c8c3c946..887d9e16 100644 --- a/damus/ContentView.swift +++ b/damus/ContentView.swift @@ -565,7 +565,9 @@ struct ContentView: View { current_boost = nil } Button(NSLocalizedString("Repost", comment: "Button to confirm reposting a post.")) { - self.damus_state?.pool.send(.event(current_boost!)) + if let current_boost { + self.damus_state?.pool.send(.event(current_boost)) + } } } message: { Text("Are you sure you want to repost this?", comment: "Alert message to ask if user wants to repost a post.")