segment: Check open_null_ctx() return value