cmArray.c: When the array handle is invalid cmArrayCount() now returns 0 instead of throwing an error.
This commit is contained in:
parent
2ccd818b55
commit
e5ee3deafd
@ -95,6 +95,9 @@ unsigned cmArrayExpandCount( cmArrayH_t h )
|
|||||||
|
|
||||||
unsigned cmArrayCount( cmArrayH_t h )
|
unsigned cmArrayCount( cmArrayH_t h )
|
||||||
{
|
{
|
||||||
|
if( cmArrayIsValid(h) == false )
|
||||||
|
return 0;
|
||||||
|
|
||||||
cmAr_t* p = _cmArHandleToPtr(h);
|
cmAr_t* p = _cmArHandleToPtr(h);
|
||||||
return p->cur_cnt;
|
return p->cur_cnt;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user