projects
/
platform
/
core
/
csapi
/
tizenfx.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a6bdb0f
)
Fix some SVACE issues of null reference.
author
zhouhao02
<haozhou.zhou@samsung.com>
Sun, 8 Oct 2023 09:23:08 +0000
(17:23 +0800)
committer
Eunki Hong
<h.pichulia@gmail.com>
Tue, 31 Oct 2023 14:07:28 +0000
(23:07 +0900)
src/Tizen.NUI.Components/Controls/TabButton.cs
patch
|
blob
|
history
diff --git
a/src/Tizen.NUI.Components/Controls/TabButton.cs
b/src/Tizen.NUI.Components/Controls/TabButton.cs
index
9c91b2d
..
e982498
100755
(executable)
--- a/
src/Tizen.NUI.Components/Controls/TabButton.cs
+++ b/
src/Tizen.NUI.Components/Controls/TabButton.cs
@@
-301,10
+301,10
@@
namespace Tizen.NUI.Components
// Text only
if (isEmptyIcon && !isEmptyText)
{
// Text only
if (isEmptyIcon && !isEmptyText)
{
- if (tabButtonStyle.Size != null)
+ if (tabButtonStyle.Size
is var size && size
!= null)
{
{
- WidthSpecification = (int)
tabButtonStyle.S
ize.Width;
- HeightSpecification = (int)
tabButtonStyle.S
ize.Height;
+ WidthSpecification = (int)
s
ize.Width;
+ HeightSpecification = (int)
s
ize.Height;
}
if ((tabButtonStyle.Text != null) && (tabButtonStyle.Text.PixelSize != null) && (tabButtonStyle.Text.PixelSize.Normal != null))
}
if ((tabButtonStyle.Text != null) && (tabButtonStyle.Text.PixelSize != null) && (tabButtonStyle.Text.PixelSize.Normal != null))
@@
-335,11
+335,11
@@
namespace Tizen.NUI.Components
WidthSpecification = (int)tabButtonStyle.SizeWithIcon.Width;
HeightSpecification = (int)tabButtonStyle.SizeWithIcon.Height;
}
WidthSpecification = (int)tabButtonStyle.SizeWithIcon.Width;
HeightSpecification = (int)tabButtonStyle.SizeWithIcon.Height;
}
-
- if (
(tabButtonStyle.Icon != null) && (tabButtonStyle.Icon.Size != null)
)
+ var size = tabButtonStyle.Icon?.Size;
+ if (
size != null
)
{
{
- Icon.WidthSpecification = (int)
tabButtonStyle.Icon.S
ize.Width;
- Icon.HeightSpecification = (int)
tabButtonStyle.Icon.S
ize.Height;
+ Icon.WidthSpecification = (int)
s
ize.Width;
+ Icon.HeightSpecification = (int)
s
ize.Height;
}
TextLabel.PixelSize = tabButtonStyle.TextSizeWithIcon;
}
TextLabel.PixelSize = tabButtonStyle.TextSizeWithIcon;
@@
-347,10
+347,10
@@
namespace Tizen.NUI.Components
// Nothing
else
{
// Nothing
else
{
- if (tabButtonStyle.Size != null)
+ if (tabButtonStyle.Size
is var size && size
!= null)
{
{
- WidthSpecification = (int)
tabButtonStyle.S
ize.Width;
- HeightSpecification = (int)
tabButtonStyle.S
ize.Height;
+ WidthSpecification = (int)
s
ize.Width;
+ HeightSpecification = (int)
s
ize.Height;
}
}
}
}
}
}