mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 23:59:21 -04:00
check for null value insert
This commit is contained in:
parent
4219779ce4
commit
4b69b986da
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user