diff options
author | sr55 <[email protected]> | 2014-05-22 20:15:29 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2014-05-22 20:15:29 +0000 |
commit | 6e8ba5a98c43fd99b70ff7844a5469b76ff46d62 (patch) | |
tree | e9480871eedb750dafa0f440b37fd4ab2dfbf297 /win/CS/HandBrake.Interop/HandBrakeInterop | |
parent | e76eb1a5ff37522f527242381090fff48422b41a (diff) |
WinGui: Handle Zero Pointer better in the NativeList. This can happen sometimes during previews.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6202 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/CS/HandBrake.Interop/HandBrakeInterop')
-rw-r--r-- | win/CS/HandBrake.Interop/HandBrakeInterop/Helpers/NativeList.cs | 6 |
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);
}
}
|