  We investigate the collisional stability of magnetically trapped ultracold
molecules, taking into account the influence of magnetic fields. We compute
elastic and spin-state-changing inelastic rate constants for collisions of the
prototype molecule $^{17}$O$_2$ with a $^3$He buffer gas as a function of the
magnetic field and the translational collision energy. We find that
spin-state-changing collisions are suppressed by Wigner's threshold laws as
long as the asymptotic Zeeman splitting between incident and final states does
not exceed the height of the centrifugal barrier in the exit channel. In
addition, we propose a useful one-parameter fitting formula that describes the
threshold behavior of the inelastic rates as a function of the field and
collision energy. Results show a semi-quantitative agreement of this formula
with the full quantum calculations, and suggest useful applications also to
different systems. As an example, we predict the low-energy rate constants
relevant to evaporative cooling of molecular oxygen.
