mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Fix null ref exception in PrayerSystem (#28712)
* Fix null ref exception in PrayerSystem * Also check that prayable ent/comp still exist
This commit is contained in:
parent
cce50da170
commit
7f686a6ae5
1 changed files with 3 additions and 1 deletions
|
|
@ -56,7 +56,9 @@ public sealed class PrayerSystem : EntitySystem
|
|||
|
||||
_quickDialog.OpenDialog(actor.PlayerSession, Loc.GetString(comp.Verb), Loc.GetString("prayer-popup-notify-pray-ui-message"), (string message) =>
|
||||
{
|
||||
Pray(actor.PlayerSession, comp, message);
|
||||
// Make sure the player's entity and the Prayable entity+component still exist
|
||||
if (actor?.PlayerSession != null && HasComp<PrayableComponent>(uid))
|
||||
Pray(actor.PlayerSession, comp, message);
|
||||
});
|
||||
},
|
||||
Impact = LogImpact.Low,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue