spree/spree — pull request #2959 by huoxito (2013-05-02 00:49:36+00:00)
Title: Only run transition callbacks if order state is cart

Calling order.next_transition.run_callbacks with order in payment state
might raise

undefined method `run_callbacks' for nil:NilClass

And we only need to call that manually when changing from cart to
address, fixes #2921

Please let me know if I missed anything or it breaks the build. I've only run controllers and the checkout feature spec.