File tree Expand file tree Collapse file tree
src/libraries/TedToolkit.Grasshopper.Sources Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1212 <IsApplicationProject >$(MSBuildProjectDirectory.Contains('applications'))</IsApplicationProject >
1313 <IsLibraryProject >$(MSBuildProjectDirectory.Contains('libraries'))</IsLibraryProject >
1414 <NeedPackage >False</NeedPackage >
15- <NeedPackage Condition =" !$(IsTestProject) and !$(IsApplicationProject) and !$(IsRoslynProject) and '$(Configuration )' == 'Release '" >True</NeedPackage >
15+ <NeedPackage Condition =" '$(MSBuildProjectName )' == 'TedToolkit.Grasshopper '" >True</NeedPackage >
1616 <NeedRoslyn >False</NeedRoslyn >
1717 <NeedRoslyn Condition =" !$(IsTestProject) and $(IsRoslynProject)" >True</NeedRoslyn >
1818 <NeedAlmostAllFrameWorks >False</NeedAlmostAllFrameWorks >
Original file line number Diff line number Diff line change @@ -14,9 +14,17 @@ internal static partial class TedToolkitResources
1414 {
1515 using var stream = typeof ( TedToolkitResources ) . Assembly . GetManifestResourceStream ( resourceName ) ;
1616 if ( stream is null ) return null ;
17- var bitmap = new Bitmap ( stream ) ;
18- if ( bitmap . Width < 2 || bitmap . Height < 2 ) return null ! ;
19- return bitmap ;
17+ if ( stream . Length is 0 ) return null ;
18+ try
19+ {
20+ var bitmap = new Bitmap ( stream ) ;
21+ if ( bitmap . Width < 2 || bitmap . Height < 2 ) return null ! ;
22+ return bitmap ;
23+ }
24+ catch
25+ {
26+ return null ;
27+ }
2028 }
2129
2230 private static string GetKey ( string key , string value )
You can’t perform that action at this time.
0 commit comments