mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2026-04-20 09:37:07 -04:00
check for null value insert (#2350)
Co-authored-by: SerpentSpirale <serpentspirale@gmail.com>
This commit is contained in:
@@ -43,6 +43,8 @@ public final class ExtraCore {
|
||||
* @param value The value
|
||||
*/
|
||||
public static void setValue(String key, Object value){
|
||||
if(value == null || key == null) return; // null values create an NPE on insertion
|
||||
|
||||
getInstance().valueMap.put(key, value);
|
||||
ConcurrentLinkedQueue<WeakReference<ExtraListener>> extraListenerList = getInstance().listenerMap.get(key);
|
||||
if(extraListenerList == null) return; //No listeners
|
||||
|
||||
Reference in New Issue
Block a user