[Plugin Loader] Unregister loader callback

This callback should be unregistered when plugin loading completes,
otherwise we could end up processing bundles loaded by external stuff,
like Audio Units loading for MIDI playback.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
xcode15
Christopher Snowhill 2022-07-02 04:31:22 -07:00
parent 310a6d44f9
commit 4450f13a8e
1 changed files with 3 additions and 0 deletions

View File

@ -196,6 +196,9 @@ static PluginController *sharedPluginController = nil;
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bundleDidLoad:) name:NSBundleDidLoadNotification object:nil];
[self loadPlugins];
[[NSNotificationCenter defaultCenter] removeObserver:self name:NSBundleDidLoadNotification object:nil];
[self printPluginInfo];
}
}