summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--win/CS/HandBrake.Interop/HandBrakeInterop/Helpers/NativeList.cs6
1 files changed, 4 insertions, 2 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrakeInterop/Helpers/NativeList.cs b/win/CS/HandBrake.Interop/HandBrakeInterop/Helpers/NativeList.cs
index c77c58cb9..d21f84ed4 100644
--- a/win/CS/HandBrake.Interop/HandBrakeInterop/Helpers/NativeList.cs
+++ b/win/CS/HandBrake.Interop/HandBrakeInterop/Helpers/NativeList.cs
@@ -11,6 +11,7 @@ namespace HandBrake.Interop.Helpers
{
using System;
using System.Collections.Generic;
+ using System.Diagnostics;
using System.Runtime.InteropServices;
using HandBrake.Interop.HbLib;
@@ -45,8 +46,9 @@ namespace HandBrake.Interop.Helpers
public int Count
{
get
- {
- return HBFunctions.hb_list_count(this.Ptr);
+ {
+ Debug.WriteLine("Got a Zero Pointer in the NativeList");
+ return this.Ptr == IntPtr.Zero ? 0 : HBFunctions.hb_list_count(this.Ptr);
}
}