FIX: PostExtensions did not work for posts without topics.

FIX: PostExtensions did not work for posts without topics.

diff --git a/plugin.rb b/plugin.rb
index 36f3508..797fa5e 100644
--- a/plugin.rb
+++ b/plugin.rb
@@ -148,11 +148,11 @@ after_initialize do
     # Hide version (staff) and public version (regular users) because post
     # revisions will not be decrypted.
     def version
-      topic.custom_fields["encrypted_title"] ? 1 : super
+      topic&.custom_fields["encrypted_title"] ? 1 : super
     end
 
     def public_version
-      topic.custom_fields["encrypted_title"] ? 1 : super
+      topic&.custom_fields["encrypted_title"] ? 1 : super
     end
   end

GitHub sha: 6450f619