|
@@ -136,9 +136,12 @@ public class PowerManager
|
|
|
|
|
|
public Power GetCrystalPowerByIndex(int index)
|
|
|
{
|
|
|
- if(index >= 0 && index < crystalPowers.Length)
|
|
|
+ if(crystalPowers != null)
|
|
|
{
|
|
|
- return crystalPowers[index];
|
|
|
+ if(index >= 0 && index < crystalPowers.Length)
|
|
|
+ {
|
|
|
+ return crystalPowers[index];
|
|
|
+ }
|
|
|
}
|
|
|
return null;
|
|
|
}
|