Can w be NULL here?