Skip to content

Commit

Permalink
fix crash if aspect ratio is not present
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargaj committed Dec 26, 2024
1 parent 2ddc55b commit 5663f64
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BlueWP/Controls/Post/PostBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 5663f64

Please sign in to comment.