diff --git a/BlueWP/Controls/Post/PostBase.cs b/BlueWP/Controls/Post/PostBase.cs index 333607a..c017370 100644 --- a/BlueWP/Controls/Post/PostBase.cs +++ b/BlueWP/Controls/Post/PostBase.cs @@ -66,7 +66,7 @@ public int VideoHeight { return 100; } - int height = (int)(ActualWidth * PostVideo.aspectRatio.height / PostVideo.aspectRatio.width); + int height = PostVideo.aspectRatio == null ? 400 : (int)(ActualWidth * PostVideo.aspectRatio.height / PostVideo.aspectRatio.width); height = Math.Min(height, 400); return height; }