FMOD_ChannelGroup_GetGroup() private method

private FMOD_ChannelGroup_GetGroup ( IntPtr channelgroup, int index, IntPtr &group ) : RESULT
channelgroup System.IntPtr
index int
group System.IntPtr
return RESULT
        public RESULT getGroup(int index, ref ChannelGroup group)
        {
            RESULT rESULT = RESULT.OK;
            IntPtr raw    = IntPtr.Zero;

            try
            {
                rESULT = ChannelGroup.FMOD_ChannelGroup_GetGroup(channelgroupraw, index, ref raw);
            }
            catch
            {
                rESULT = RESULT.ERR_INVALID_PARAM;
            }
            RESULT result;

            if (rESULT != RESULT.OK)
            {
                result = rESULT;
            }
            else
            {
                if (group == null)
                {
                    ChannelGroup channelGroup = new ChannelGroup();
                    channelGroup.setRaw(raw);
                    group = channelGroup;
                }
                else
                {
                    group.setRaw(raw);
                }
                result = rESULT;
            }
            return(result);
        }