diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php
index 4d42b631bcb34e4a442b88e19de9f7ddb43c381d..ef7a1826242477a55505437ed412506f667efa9e 100644
--- a/module/VuFind/src/VuFind/Controller/SearchController.php
+++ b/module/VuFind/src/VuFind/Controller/SearchController.php
@@ -408,10 +408,14 @@ class SearchController extends AbstractSearch
         // Call rather than forward, so we can use custom template
         $view = $this->resultsAction();
 
-        // Customize the URL helper to make sure it builds proper reserves URLs:
-        $url = $view->results->getUrlQuery();
-        $url->setDefaultParameter('range', $range);
-        $url->setDefaultParameter('department', $dept);
+        // Customize the URL helper to make sure it builds proper reserves URLs
+        // (check it's set first -- RSS feed will return a response model rather
+        // than a view model):
+        if (isset($view->results)) {
+            $url = $view->results->getUrlQuery();
+            $url->setDefaultParameter('range', $range);
+            $url->setDefaultParameter('department', $dept);
+        }
 
         return $view;
     }