Fix an invalid null deref check in the slider code.