Fixing error in parameter type that was causing a crash. Adding a Q_ASSERT_X in case this happens again.