fix NPE reported by crittercism

Not sure why it's happening, but testing and dropping is a fine fix.
This commit is contained in:
Eric House 2016-09-05 14:11:06 -07:00
parent 5e90ed0073
commit bd2fbdeb88

View file

@ -965,9 +965,11 @@ public class DlgDelegate {
Dialog result = null;
DlgID dlgID = DlgID.values()[id];
WeakReference<DelegateBase> ref = s_pendings.get( dlgID );
DelegateBase dlgt = ref.get();
if ( null != dlgt ) {
result = dlgt.onCreateDialog( id );
if ( null != ref ) {
DelegateBase dlgt = ref.get();
if ( null != dlgt ) {
result = dlgt.onCreateDialog( id );
}
}
return result;
}