Fix error on "(at) anchor" selector when no anchor is opened.
This commit is contained in:
@@ -89,7 +89,7 @@ namespace Cryville.Crtr {
|
||||
else return Enumerable.Empty<SkinContext>();
|
||||
}
|
||||
public override bool IsUpdatable(ContainerState h) {
|
||||
return h.Handler.OpenedAnchor.Name == Name;
|
||||
return h.Handler.OpenedAnchor != null && h.Handler.OpenedAnchor.Name == Name;
|
||||
}
|
||||
}
|
||||
public class AtAnchor : SkinSelector {
|
||||
@@ -101,7 +101,7 @@ namespace Cryville.Crtr {
|
||||
return IsUpdatable(h) ? c : null;
|
||||
}
|
||||
public override bool IsUpdatable(ContainerState h) {
|
||||
return h.Handler.OpenedAnchor.Name == Name;
|
||||
return h.Handler.OpenedAnchor != null && h.Handler.OpenedAnchor.Name == Name;
|
||||
}
|
||||
}
|
||||
public class Property : SkinSelector {
|
||||
|
Reference in New Issue
Block a user