Revision 4e339882

b/libcacard/vcard_emul_nss.c
1005 1005
    SECMOD_GetReadLock(module_lock);
1006 1006
    for (mlp = module_list; mlp; mlp = mlp->next) {
1007 1007
        SECMODModule *module = mlp->module;
1008
        PRBool has_emul_slots = PR_FALSE;
1009 1008

  
1010
        if (module == NULL) {
1011
                continue;
1009
        /* Ignore the internal module */
1010
        if (module == NULL || module == SECMOD_GetInternalModule()) {
1011
            continue;
1012 1012
        }
1013 1013

  
1014 1014
        for (i = 0; i < module->slotCount; i++) {
......
1024 1024
                                  vreader_emul_delete);
1025 1025
            vreader_add_reader(vreader);
1026 1026

  
1027
            has_readers = PR_TRUE;
1028
            has_emul_slots = PR_TRUE;
1029

  
1030 1027
            if (PK11_IsPresent(slot)) {
1031 1028
                VCard *vcard;
1032 1029
                vcard = vcard_emul_mirror_card(vreader);
......
1035 1032
                vcard_free(vcard);
1036 1033
            }
1037 1034
        }
1038
        if (has_emul_slots) {
1039
            vcard_emul_new_event_thread(module);
1040
        }
1035
        vcard_emul_new_event_thread(module);
1041 1036
    }
1042 1037
    SECMOD_ReleaseReadLock(module_lock);
1043
    nss_emul_init = has_readers;
1038
    nss_emul_init = PR_TRUE;
1044 1039

  
1045 1040
    return VCARD_EMUL_OK;
1046 1041
}

Also available in: Unified diff