mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
fix: type confusion when assigning dep getter tasks
This commit is contained in:
parent
5b10ecfc04
commit
53bfda3b33
2 changed files with 6 additions and 3 deletions
|
|
@ -10,6 +10,7 @@ using Dalamud.Game;
|
|||
using Dalamud.Game.Gui.Internal;
|
||||
using Dalamud.Interface.Internal;
|
||||
using Dalamud.Plugin.Internal;
|
||||
using Dalamud.Utility;
|
||||
using Serilog;
|
||||
|
||||
#if DEBUG
|
||||
|
|
@ -81,6 +82,7 @@ internal sealed class Dalamud : IServiceType
|
|||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e, "Service initialization failure");
|
||||
Util.Fatal("Dalamud could not initialize correctly. Please report this error. \n\nThe game will continue, but you may not be able to use plugins.", "Dalamud", false);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
|||
|
|
@ -138,8 +138,9 @@ internal static class ServiceManager
|
|||
|
||||
Debug.Assert(!serviceKind.HasFlag(ServiceKind.ManualService), "Regular services should never end up here");
|
||||
|
||||
var getTask = (Task)typeof(Service<>)
|
||||
.MakeGenericType(serviceType)
|
||||
var genericWrappedServiceType = typeof(Service<>).MakeGenericType(serviceType);
|
||||
|
||||
var getTask = (Task)genericWrappedServiceType
|
||||
.InvokeMember(
|
||||
"GetAsync",
|
||||
BindingFlags.InvokeMethod | BindingFlags.Static | BindingFlags.Public,
|
||||
|
|
@ -149,7 +150,7 @@ internal static class ServiceManager
|
|||
|
||||
if (serviceKind.HasFlag(ServiceKind.BlockingEarlyLoadedService))
|
||||
{
|
||||
getAsyncTaskMap[typeof(Service<>).MakeGenericType(serviceType)] = getTask;
|
||||
getAsyncTaskMap[serviceType] = getTask;
|
||||
blockingEarlyLoadingServices.Add(serviceType);
|
||||
}
|
||||
else
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue