From 709a2ed320e51dfe92f731c3419c4795af931b62 Mon Sep 17 00:00:00 2001 From: MobiusDev <8391001+MobiusDevelopment@users.noreply.github.com> Date: Wed, 6 Dec 2017 18:36:01 +0000 Subject: [PATCH] Prevent augment option NPE. --- .../com/l2jmobius/gameserver/model/Augmentation.java | 10 ++++++++-- .../com/l2jmobius/gameserver/model/Augmentation.java | 10 ++++++++-- .../com/l2jmobius/gameserver/model/Augmentation.java | 10 ++++++++-- .../com/l2jmobius/gameserver/model/Augmentation.java | 10 ++++++++-- .../com/l2jmobius/gameserver/model/Augmentation.java | 10 ++++++++-- 5 files changed, 40 insertions(+), 10 deletions(-) diff --git a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/Augmentation.java b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/Augmentation.java index 9a0e2b459d..cf03d353e1 100644 --- a/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/Augmentation.java +++ b/L2J_Mobius_1.0_Ertheia/java/com/l2jmobius/gameserver/model/Augmentation.java @@ -81,7 +81,10 @@ public final class Augmentation { for (Options op : _options) { - op.apply(player); + if (op != null) + { + op.apply(player); + } } } @@ -89,7 +92,10 @@ public final class Augmentation { for (Options op : _options) { - op.remove(player); + if (op != null) + { + op.remove(player); + } } } } diff --git a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/Augmentation.java b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/Augmentation.java index 9a0e2b459d..cf03d353e1 100644 --- a/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/Augmentation.java +++ b/L2J_Mobius_2.5_Underground/java/com/l2jmobius/gameserver/model/Augmentation.java @@ -81,7 +81,10 @@ public final class Augmentation { for (Options op : _options) { - op.apply(player); + if (op != null) + { + op.apply(player); + } } } @@ -89,7 +92,10 @@ public final class Augmentation { for (Options op : _options) { - op.remove(player); + if (op != null) + { + op.remove(player); + } } } } diff --git a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/Augmentation.java b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/Augmentation.java index 9a0e2b459d..cf03d353e1 100644 --- a/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/Augmentation.java +++ b/L2J_Mobius_3.0_Helios/java/com/l2jmobius/gameserver/model/Augmentation.java @@ -81,7 +81,10 @@ public final class Augmentation { for (Options op : _options) { - op.apply(player); + if (op != null) + { + op.apply(player); + } } } @@ -89,7 +92,10 @@ public final class Augmentation { for (Options op : _options) { - op.remove(player); + if (op != null) + { + op.remove(player); + } } } } diff --git a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/Augmentation.java b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/Augmentation.java index 9a0e2b459d..cf03d353e1 100644 --- a/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/Augmentation.java +++ b/L2J_Mobius_4.0_GrandCrusade/java/com/l2jmobius/gameserver/model/Augmentation.java @@ -81,7 +81,10 @@ public final class Augmentation { for (Options op : _options) { - op.apply(player); + if (op != null) + { + op.apply(player); + } } } @@ -89,7 +92,10 @@ public final class Augmentation { for (Options op : _options) { - op.remove(player); + if (op != null) + { + op.remove(player); + } } } } diff --git a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/Augmentation.java b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/Augmentation.java index 9a0e2b459d..cf03d353e1 100644 --- a/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/Augmentation.java +++ b/L2J_Mobius_Classic_2.0_Saviors/java/com/l2jmobius/gameserver/model/Augmentation.java @@ -81,7 +81,10 @@ public final class Augmentation { for (Options op : _options) { - op.apply(player); + if (op != null) + { + op.apply(player); + } } } @@ -89,7 +92,10 @@ public final class Augmentation { for (Options op : _options) { - op.remove(player); + if (op != null) + { + op.remove(player); + } } } }