diff --git a/src/Extension/SiteTreeSubsites.php b/src/Extension/SiteTreeSubsites.php
index <HASH>..<HASH> 100644
--- a/src/Extension/SiteTreeSubsites.php
+++ b/src/Extension/SiteTreeSubsites.php
@@ -154,7 +154,9 @@ class SiteTreeSubsites extends DataExtension
             }
 
             $urlsegment = $fields->dataFieldByName('URLSegment');
-            $urlsegment->setURLPrefix($baseLink);
+            if ($urlsegment) {
+                $urlsegment->setURLPrefix($baseLink);
+            }
         }
     }
Bugfix: Don't assume all forms have a URLSegment field