about summary refs log tree commit diff
path: root/app/controllers/stream_entries_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/stream_entries_controller.rb')
-rw-r--r--app/controllers/stream_entries_controller.rb15
1 files changed, 9 insertions, 6 deletions
diff --git a/app/controllers/stream_entries_controller.rb b/app/controllers/stream_entries_controller.rb
index e1b664b08..a364fa01c 100644
--- a/app/controllers/stream_entries_controller.rb
+++ b/app/controllers/stream_entries_controller.rb
@@ -8,13 +8,16 @@ class StreamEntriesController < ApplicationController
   def show
     @type = @stream_entry.activity_type.downcase
 
-    if @stream_entry.activity_type == 'Status'
-      @ancestors   = @stream_entry.activity.ancestors
-      @descendants = @stream_entry.activity.descendants
-    end
-
     respond_to do |format|
-      format.html
+      format.html do
+        return gone if @stream_entry.activity.nil?
+
+        if @stream_entry.activity_type == 'Status'
+          @ancestors   = @stream_entry.activity.ancestors
+          @descendants = @stream_entry.activity.descendants
+        end
+      end
+
       format.atom
     end
   end