Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 1c4c310

Browse files
committed
Fixed null references in gfy creation parameters
1 parent 7358898 commit 1c4c310

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/Gfycat.Net.Analytics/Gfycat.Net.Analytics.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
2323
<PackageReleaseNotes></PackageReleaseNotes>
2424
<PackageIconUrl></PackageIconUrl>
25-
<Version>1.0.2</Version>
25+
<Version>1.0.3</Version>
2626
</PropertyGroup>
2727

2828
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">

src/Gfycat.Net/GfyCreationParameters.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ internal API.Models.GfyParameters CreateModel()
1212
{
1313
return new API.Models.GfyParameters()
1414
{
15-
Captions = Captions.Select(cap => new API.Models.Caption()
15+
Captions = Captions?.Select(cap => (cap == null) ? null : new API.Models.Caption()
1616
{
1717
Duration = cap.Duration,
1818
FontHeight = cap.FontHeight,
@@ -24,14 +24,14 @@ internal API.Models.GfyParameters CreateModel()
2424
X = cap.XPosition,
2525
Y = cap.YPosition,
2626
}),
27-
Crop = new API.Models.Crop()
27+
Crop = (Crop == null) ? null : new API.Models.Crop()
2828
{
2929
H = Crop.Height,
3030
W = Crop.Width,
3131
X = Crop.XPosition,
3232
Y = Crop.YPosition
3333
},
34-
Cut = new API.Models.Cut()
34+
Cut = (Cut == null) ? null : new API.Models.Cut()
3535
{
3636
Duration = Cut.Duration,
3737
Start = Cut.Start

src/Gfycat.Net/Gfycat.Net.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<Copyright></Copyright>
1010
<NeutralLanguage>en-US</NeutralLanguage>
1111
<PackageTags>gfycat;netstandard</PackageTags>
12-
<PackageReleaseNotes>Initial release. Supports all non-testing endpoints.</PackageReleaseNotes>
12+
<PackageReleaseNotes>Fixed null references in GfyCreationParameters</PackageReleaseNotes>
1313
<DefineConstants>NETSTANDARD1_2;RELEASE</DefineConstants>
1414
<Optimize>False</Optimize>
1515
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
@@ -21,7 +21,7 @@
2121
<RepositoryType>git</RepositoryType>
2222
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
2323
<AssemblyName>Gfycat.Net</AssemblyName>
24-
<Version>1.0.2</Version>
24+
<Version>1.0.3</Version>
2525
</PropertyGroup>
2626
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.2|AnyCPU'">
2727
<GenerateDocumentationFile>true</GenerateDocumentationFile>

0 commit comments

Comments
 (0)