[Click] bug on lib/element.cc

Jacky Cheng wccheng2000 at gmail.com
Fri Oct 21 17:09:40 EDT 2005


Hi,
 Router crashed if Element(int, int) constructer is used.
 int
Element::set_nports(int new_ninputs, int new_noutputs)
{
// exit on bad counts, or if already initialized
if (new_ninputs < 0 || new_noutputs < 0)
return -EINVAL;
- if (_router->_have_connections) {
+ if (_router && _router->_have_connections) {
if (_router->_state >= Router::ROUTER_PREINITIALIZE)
return -EBUSY;
_router->_have_connections = false;
}
 --Jacky


More information about the click mailing list