mirror of
https://github.com/QL-Win/QuickLook.git
synced 2026-05-08 03:06:29 +08:00
Log exception in WindowInteropHelperExtension
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
using QuickLook.Common.Helpers;
|
||||
using System;
|
||||
using System.Windows.Interop;
|
||||
|
||||
@@ -30,9 +31,10 @@ public static class WindowInteropHelperExtension
|
||||
{
|
||||
return windowInteropHelper?.EnsureHandle() ?? IntPtr.Zero;
|
||||
}
|
||||
catch
|
||||
catch (Exception e)
|
||||
{
|
||||
// Returning 0 is fine, since this error usually only occurs when the window is already closed or being disposed.
|
||||
ProcessHelper.WriteLog(e.ToString());
|
||||
return IntPtr.Zero;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user