glui: Fix potential memory leak

Also remove a check for null, since it's already checked via the `if (!menu->userdata)`, since we essentially just cast that.