Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NUI] Fix marpkup null type error #6723

Open
wants to merge 1 commit into
base: DevelNUI
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/Tizen.NUI.Extension/Markup/ViewExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -644,8 +644,11 @@ public static UIColor Color(this View view)
{
return (UIColor)token;
}

var color = view.Color;

//FIXME: we need to set UI value type directly without converting reference value.
return new UIColor(view.Color);
return color != null ? new UIColor(color) : UIColor.Transparent;
}

/// <summary>
Expand All @@ -671,7 +674,8 @@ public static UICorner CornerRadius(this View view)
{
// TODO Do not use Vector4 here
var corner = view.CornerRadius;
return new UICorner(corner.X, corner.Y, corner.Z, corner.W, view.CornerRadiusPolicy == VisualTransformPolicyType.Relative);

return corner != null ? new UICorner(corner.X, corner.Y, corner.Z, corner.W, view.CornerRadiusPolicy == VisualTransformPolicyType.Relative) : UICorner.Zero;
}

/// <summary>
Expand All @@ -685,8 +689,11 @@ public static UIColor BorderlineColor(this View view)
{
return (UIColor)token;
}

var color = view.BorderlineColor;

//FIXME: we need to set UI value type directly without converting reference value.
return new UIColor(view.BorderlineColor);
return color != null ? new UIColor(color) : UIColor.Transparent;
}
}
}
Loading