Browse Source

* Fixed AV in design-view

git-svn-id: trunk@14959 -
joost 15 years ago
parent
commit
f8e6a86e32
1 changed files with 7 additions and 4 deletions
  1. 7 4
      packages/fcl-web/src/webpage.pp

+ 7 - 4
packages/fcl-web/src/webpage.pp

@@ -429,14 +429,17 @@ begin
   ActionVar := '';
   if assigned(owner) then
     begin
-    if (owner is TWebPage) and assigned(TWebPage(Owner).WebModule) then
+    if (owner is TWebPage) then
       WebMod := TWebPage(Owner).WebModule
     else if (owner is TFPWebModule) then
       WebMod := TFPWebModule(Owner);
 
-    ActionVar := WebMod.ActionVar;
-    if (action = '') and assigned(WebMod.Actions) and assigned(WebMod.Actions.CurrentAction) then
-      result := WebMod.Actions.CurrentAction.Name;
+    if assigned(WebMod) then
+      begin
+      ActionVar := WebMod.ActionVar;
+      if (action = '') and assigned(WebMod.Actions) and assigned(WebMod.Actions.CurrentAction) then
+        result := WebMod.Actions.CurrentAction.Name;
+      end;
     end;
   if ActionVar='' then FancyTitle:=true;
   if Assigned(ARequest) then