From 3c273670f01685544d98d8b9ae1572a4cf06478b Mon Sep 17 00:00:00 2001 From: The Grox Empire <47816228+TheGroxEmpire@users.noreply.github.com> Date: Sun, 16 Apr 2023 21:59:52 +0700 Subject: [PATCH] Core: Added panic when Custom Rotation is empty --- sim/common/custom_rotation.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sim/common/custom_rotation.go b/sim/common/custom_rotation.go index 7ad9d73ffe..3adeeab983 100644 --- a/sim/common/custom_rotation.go +++ b/sim/common/custom_rotation.go @@ -120,6 +120,10 @@ func (cs *CustomSpell) CPM(sim *core.Simulation) float64 { } func (cr *CustomRotation) Cast(sim *core.Simulation) bool { + if cr == nil { + panic("Custom Rotation is empty") + } + spell := cr.ChooseSpell(sim) if spell == nil {