diff --git a/core/modules/views/src/Form/ViewsForm.php b/core/modules/views/src/Form/ViewsForm.php
index cdf39eb..4951777 100644
--- a/core/modules/views/src/Form/ViewsForm.php
+++ b/core/modules/views/src/Form/ViewsForm.php
@@ -14,6 +14,7 @@
 use Drupal\Core\Form\FormInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Routing\UrlGeneratorInterface;
+use Drupal\Core\Url;
 use Drupal\views\ViewExecutable;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RequestStack;
diff --git a/core/modules/views/src/ViewExecutable.php b/core/modules/views/src/ViewExecutable.php
index d74fe31..5959435 100644
--- a/core/modules/views/src/ViewExecutable.php
+++ b/core/modules/views/src/ViewExecutable.php
@@ -19,6 +19,7 @@
 use Drupal\Component\Utility\Tags;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\Response;
+use Symfony\Component\Routing\Exception\RouteNotFoundException;
 
 /**
  * Represents a view as a whole.
@@ -1740,6 +1741,16 @@ public function hasUrl($args = NULL, $display_id = NULL) {
       return FALSE;
     }
 
+    // Check to see if the route for the display actually exists.  This can
+    // potentially not happen for views that have not been saved yet.
+    // WTF? $this->routeProvider doesn't exists!?!?
+    try {
+      $route = \Drupal::service('router.route_provider')->getRouteByName('view.' . $this->id() . '.' . $this->current_display);
+    }
+    catch (RouteNotFoundException $e) {
+      return FALSE;
+    }
+
     return TRUE;
   }
 
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index 68eb0e8..a100be3 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -608,7 +608,7 @@ public function renderPreview($display_id, $args = array()) {
       $this->executable->setArguments($args);
 
       // Store the current view URL for later use:
-      if ($this->executable->display_handler->getOption('path')) {
+      if ($this->executable->hasUrl() && $this->executable->display_handler->getOption('path')) {
         $path = $this->executable->getUrl();
       }
 
