Avoid a crash when disabling a non-enabled extension with load errors.
Review Request #11926 — Created Jan. 11, 2022 and submitted — Latest diff uploaded
disable_extension()made an assumption that it should always send an
extension_disabled()signal, and that it always had an
object to pass in.
If the extension being disabled was never enabled but had a load error,
this assumption would break. This is a pretty obscure case, but one that
was hit with some test work.
We now set
Nonein this case, and only emit the signal
Unit tests pass.
Verified this fixed the issue I was hitting in upcoming test changes.