return -1;
}
- *DataPtr = (Uint8*)Buffer->SubBuffers[Index].Data + Buffer->SubBuffers[Index].PreLength;
- *Length = Buffer->SubBuffers[Index].PostLength;
+ if( DataPtr )
+ *DataPtr = (Uint8*)Buffer->SubBuffers[Index].Data + Buffer->SubBuffers[Index].PreLength;
+ if( Length )
+ *Length = Buffer->SubBuffers[Index].PostLength;
return (Index + 1) + Buffer->nSubBuffers;
}
int rv = Index + 1;
Index = Buffer->nSubBuffers - Index - 1;
// Prepended buffers
- *DataPtr = Buffer->SubBuffers[Index].Data;
- *Length = Buffer->SubBuffers[Index].PreLength;
+ if( DataPtr )
+ *DataPtr = Buffer->SubBuffers[Index].Data;
+ if( Length )
+ *Length = Buffer->SubBuffers[Index].PreLength;
return rv;
}
}