File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -910,7 +910,12 @@ private void WriteDiscInfo(IntPtr tagsPtr, IntPtr discInfoPtr)
910
910
}
911
911
else
912
912
{
913
- NativeMethods . MP4TagDisk discInfo = discInfoPtr . ReadStructure < NativeMethods . MP4TagDisk > ( ) ;
913
+ NativeMethods . MP4TagDisk discInfo = new NativeMethods . MP4TagDisk ( ) ;
914
+ if ( discInfoPtr != IntPtr . Zero )
915
+ {
916
+ discInfoPtr . ReadStructure < NativeMethods . MP4TagDisk > ( ) ;
917
+ }
918
+
914
919
if ( this . DiscNumber . Value != discInfo . index || this . TotalDiscs != discInfo . total )
915
920
{
916
921
discInfo . index = this . DiscNumber . Value ;
@@ -943,7 +948,12 @@ private void WriteTrackInfo(IntPtr tagsPtr, IntPtr trackInfoPtr)
943
948
}
944
949
else
945
950
{
946
- NativeMethods . MP4TagTrack trackInfo = trackInfoPtr . ReadStructure < NativeMethods . MP4TagTrack > ( ) ;
951
+ NativeMethods . MP4TagTrack trackInfo = new NativeMethods . MP4TagTrack ( ) ;
952
+ if ( trackInfoPtr != IntPtr . Zero )
953
+ {
954
+ trackInfo = trackInfoPtr . ReadStructure < NativeMethods . MP4TagTrack > ( ) ;
955
+ }
956
+
947
957
if ( this . TrackNumber . Value != trackInfo . index || this . TotalTracks != trackInfo . total )
948
958
{
949
959
trackInfo . index = this . TrackNumber . Value ;
You can’t perform that action at this time.
0 commit comments