[NUI][API10] Fix SVACE issue.
authorhuayong.xu <huayong.xu@samsung.com>
Wed, 22 Feb 2023 07:37:26 +0000 (15:37 +0800)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 22 Feb 2023 07:59:24 +0000 (16:59 +0900)
src/Tizen.NUI/src/public/Window/BorderWindow.cs

index 7195468..278b347 100755 (executable)
@@ -277,14 +277,14 @@ namespace Tizen.NUI
                 if (hasBottomView) borderHeight += bottomView.SizeHeight;
 
                 // Sets the minimum / maximum size to be resized by RequestResizeToServer.
-                if (borderInterface.MinSize != null)
+                if (borderInterface.MinSize is var minSize && minSize != null)
                 {
-                    using Size2D mimimumSize = new Size2D(borderInterface.MinSize.Width + (int)borderInterface.BorderLineThickness * 2, borderInterface.MinSize.Height + (int)(borderHeight + borderInterface.BorderLineThickness * 2));
+                    using Size2D mimimumSize = new Size2D(minSize.Width + (int)borderInterface.BorderLineThickness * 2, minSize.Height + (int)(borderHeight + borderInterface.BorderLineThickness * 2));
                     SetMimimumSize(mimimumSize);
                 }
-                if (borderInterface.MaxSize != null)
+                if (borderInterface.MaxSize is var maxSize && maxSize != null)
                 {
-                    using Size2D maximumSize = new Size2D(borderInterface.MaxSize.Width + (int)borderInterface.BorderLineThickness * 2, borderInterface.MaxSize.Height + (int)(borderHeight + borderInterface.BorderLineThickness * 2));
+                    using Size2D maximumSize = new Size2D(maxSize.Width + (int)borderInterface.BorderLineThickness * 2, maxSize.Height + (int)(borderHeight + borderInterface.BorderLineThickness * 2));
                     SetMaximumSize(maximumSize);
                 }