}
}
contentMap.Dispose();
- val.Dispose();
+ val?.Dispose();
}
NUILog.Debug($">");
{
if (current.TryGetTarget(out currentView))
{
- if (currentView.InternalSavedDynamicPropertyCallbacks.TryGetValue(id, out currentCallback) && currentView != null
- && currentView.InternalSavedDynamicPropertyCallbacks != null)
+ if (currentView.InternalSavedDynamicPropertyCallbacks != null &&
+ currentView.InternalSavedDynamicPropertyCallbacks.TryGetValue(id, out currentCallback) && currentView != null)
{
ret = currentCallback?.Invoke(returnType, frameNumber);
}
case (int)(VectorProperty.FillColor):
case (int)(VectorProperty.StrokeColor):
Vector3 tmpVector3 = new Vector3(-1, -1, -1);
- if (ret.Get(tmpVector3))
+ if ((ret != null) && ret.Get(tmpVector3))
{
val1 = tmpVector3.X;
val2 = tmpVector3.Y;
case (int)(VectorProperty.TransformPosition):
case (int)(VectorProperty.TransformScale):
Vector2 tmpVector2 = new Vector2(-1, -1);
- if (ret.Get(tmpVector2))
+ if ((ret != null) && ret.Get(tmpVector2))
{
val1 = tmpVector2.X;
val2 = tmpVector2.Y;
case (int)(VectorProperty.TransformRotation):
case (int)(VectorProperty.TransformOpacity):
float tmpFloat = -1;
- if (ret.Get(out tmpFloat))
+ if ((ret != null) && ret.Get(out tmpFloat))
{
val1 = tmpFloat;
}
//do nothing
break;
}
- ret.Dispose();
+ ret?.Dispose();
}
#endregion Internal
if (minSize != borderInterface.MinSize)
{
- using Size2D mimimumSize = new Size2D(borderInterface.MinSize.Width, borderInterface.MinSize.Height + (int)borderHeight);
+ using Size2D mimimumSize = new Size2D((borderInterface.MinSize?.Width ?? 0), (borderInterface.MinSize?.Height ?? 0) + (int)borderHeight);
SetMimimumSize(mimimumSize);
minSize = borderInterface.MinSize;
}
if (maxSize != borderInterface.MaxSize)
{
- using Size2D maximumSize = new Size2D(borderInterface.MaxSize.Width, borderInterface.MaxSize.Height + (int)borderHeight);
+ using Size2D maximumSize = new Size2D((borderInterface.MaxSize?.Width ?? 0), (borderInterface.MaxSize?.Height ?? 0) + (int)borderHeight);
SetMaximumSize(maximumSize);
maxSize = borderInterface.MaxSize;
}