PrimaryUpgradePatcher: Fix segfault from invalid pointer