ACL::ParseAclLine(LegacyParser, &anACL);
ACLMaxUserIP *maxUserIpACL = dynamic_cast<ACLMaxUserIP *>(anACL);
CPPUNIT_ASSERT(maxUserIpACL);
-
- /* we want a maximum of one, and strict to be true */
- CPPUNIT_ASSERT_EQUAL(1, maxUserIpACL->getMaximum());
- CPPUNIT_ASSERT_EQUAL(true, maxUserIpACL->getStrict());
- /* the acl must be vaid */
- CPPUNIT_ASSERT_EQUAL(true, maxUserIpACL->valid());
+ if (maxUserIpACL) {
+ /* we want a maximum of one, and strict to be true */
+ CPPUNIT_ASSERT_EQUAL(1, maxUserIpACL->getMaximum());
+ CPPUNIT_ASSERT_EQUAL(true, maxUserIpACL->getStrict());
+ /* the acl must be vaid */
+ CPPUNIT_ASSERT_EQUAL(true, maxUserIpACL->valid());
+ }
delete anACL;
xfree(line);
}