Skip to content

Commit 894f2aa

Browse files
Fix incorrect IntPtr null check in FftUtils (#7434)
1 parent 87e1fec commit 894f2aa

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Microsoft.ML.TimeSeries/FftUtils.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ public static void ComputeForwardFft(float[] inputRe, float[] inputIm, float[] o
248248
}
249249
finally
250250
{
251-
if (descriptor != null)
251+
if (descriptor != IntPtr.Zero)
252252
FreeDescriptor(ref descriptor);
253253
}
254254
}
@@ -294,7 +294,7 @@ public static void ComputeBackwardFft(float[] inputRe, float[] inputIm, float[]
294294
}
295295
finally
296296
{
297-
if (descriptor != null)
297+
if (descriptor != IntPtr.Zero)
298298
FreeDescriptor(ref descriptor);
299299
}
300300

@@ -350,7 +350,7 @@ public static void ComputeForwardFft(double[] inputRe, double[] inputIm, double[
350350
}
351351
finally
352352
{
353-
if (descriptor != null)
353+
if (descriptor != IntPtr.Zero)
354354
FreeDescriptor(ref descriptor);
355355
}
356356
}
@@ -396,7 +396,7 @@ public static void ComputeBackwardFft(double[] inputRe, double[] inputIm, double
396396
}
397397
finally
398398
{
399-
if (descriptor != null)
399+
if (descriptor != IntPtr.Zero)
400400
FreeDescriptor(ref descriptor);
401401
}
402402

0 commit comments

Comments
 (0)