Skip to content

Commit

Permalink
Fixed null references in gfy creation parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
ObsidianMinor committed Apr 4, 2017
1 parent 7358898 commit 1c4c310
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/Gfycat.Net.Analytics/Gfycat.Net.Analytics.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
<PackageReleaseNotes></PackageReleaseNotes>
<PackageIconUrl></PackageIconUrl>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
6 changes: 3 additions & 3 deletions src/Gfycat.Net/GfyCreationParameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ internal API.Models.GfyParameters CreateModel()
{
return new API.Models.GfyParameters()
{
Captions = Captions.Select(cap => new API.Models.Caption()
Captions = Captions?.Select(cap => (cap == null) ? null : new API.Models.Caption()
{
Duration = cap.Duration,
FontHeight = cap.FontHeight,
Expand All @@ -24,14 +24,14 @@ internal API.Models.GfyParameters CreateModel()
X = cap.XPosition,
Y = cap.YPosition,
}),
Crop = new API.Models.Crop()
Crop = (Crop == null) ? null : new API.Models.Crop()
{
H = Crop.Height,
W = Crop.Width,
X = Crop.XPosition,
Y = Crop.YPosition
},
Cut = new API.Models.Cut()
Cut = (Cut == null) ? null : new API.Models.Cut()
{
Duration = Cut.Duration,
Start = Cut.Start
Expand Down
4 changes: 2 additions & 2 deletions src/Gfycat.Net/Gfycat.Net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Copyright></Copyright>
<NeutralLanguage>en-US</NeutralLanguage>
<PackageTags>gfycat;netstandard</PackageTags>
<PackageReleaseNotes>Initial release. Supports all non-testing endpoints.</PackageReleaseNotes>
<PackageReleaseNotes>Fixed null references in GfyCreationParameters</PackageReleaseNotes>
<DefineConstants>NETSTANDARD1_2;RELEASE</DefineConstants>
<Optimize>False</Optimize>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
Expand All @@ -21,7 +21,7 @@
<RepositoryType>git</RepositoryType>
<PackageLicenseUrl>http://opensource.org/licenses/MIT</PackageLicenseUrl>
<AssemblyName>Gfycat.Net</AssemblyName>
<Version>1.0.2</Version>
<Version>1.0.3</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|netstandard1.2|AnyCPU'">
<GenerateDocumentationFile>true</GenerateDocumentationFile>
Expand Down

0 comments on commit 1c4c310

Please sign in to comment.