Changeset 335


Ignore:
Timestamp:
Mar 19, 2006 12:49:13 AM (18 years ago)
Author:
bennylp
Message:

Added assert when get_frame() or put_frame() is NULL

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjmedia/src/pjmedia/port.c

    r205 r335  
    104104{ 
    105105    PJ_ASSERT_RETURN(port && frame, PJ_EINVAL); 
     106    PJ_ASSERT_RETURN(port->get_frame, PJ_EINVALIDOP); 
    106107 
    107108    return port->get_frame(port, frame); 
     
    117118{ 
    118119    PJ_ASSERT_RETURN(port && frame, PJ_EINVAL); 
     120    PJ_ASSERT_RETURN(port->put_frame, PJ_EINVALIDOP); 
    119121 
    120122    return port->put_frame(port, frame); 
     
    142144    } 
    143145 
    144     status = port->on_destroy(port); 
     146    if (port->on_destroy) 
     147        status = port->on_destroy(port); 
     148    else 
     149        status = PJ_SUCCESS; 
    145150 
    146151    return status; 
Note: See TracChangeset for help on using the changeset viewer.