If setup() is not called yet, this will segfault. Shouldn't the NULL check stay (for enabled(), start() and end())?