[net-p2p/transmission-cli] backport patch to fix crash

Backport upstream patch from revision 13793.
Fixes crash reported on the mailing list.