mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-15 13:14:17 +01:00
CurrentProcessModules: suppress sporadic errors
This commit is contained in:
parent
0d66c7fd75
commit
d70ae468e8
1 changed files with 10 additions and 2 deletions
|
|
@ -20,11 +20,19 @@ internal static unsafe partial class CurrentProcessModules
|
|||
{
|
||||
t = 0;
|
||||
process = null;
|
||||
Log.Verbose("{what}: Fetchling fresh copy of current process modules.", nameof(CurrentProcessModules));
|
||||
Log.Verbose("{what}: Fetching fresh copy of current process modules.", nameof(CurrentProcessModules));
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
return (process ??= Process.GetCurrentProcess()).Modules;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Verbose(e, "{what}: Failed to fetch module list.", nameof(CurrentProcessModules));
|
||||
return new([]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[LibraryImport("Dalamud.Boot.dll")]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue