AvailableCoins() takes an optional CCoinControl pointer that defaults to nullptr, and the other uses of it check for null first. The TRUC version filter added in https://github.com/bitcoin/bitcoin/commit/ec2676becdf488f7a1151345a019c05dec926308 does not, so a call without coin control dereferences a null pointer as soon as the wallet has an unconfirmed output in the mempool.
Found this issue with few seconds of fuzzing with the change in the second commit which adds wallet transactions in the mempool state with a fuzzed version, and call AvailableCoins() directly with an optional null coin control.