[sword-devel] Crash when getting module type

David "Judah's Shadow" Blue yudahsshadow at gmx.com
Tue Oct 24 16:04:03 EDT 2023


I've resumed working on bibish some, and I'm getting a weird crash I never had
before. I'm trying to interate through the list of installed modules and
select those that match a given type. This is my code:


    for(libraryIterator = swordLibrary.Modules.begin();
        libraryIterator != swordLibrary.Modules.end();
        libraryIterator++) {


        sword::SWModule *tempMod = libraryIterator->second;
        modType = tempMod->getType();

        if(modType == selectedType) {
            module = "For ";
            module += tempMod->getDescription();
            module += " select ";
            module += tempMod->getName();
            moduleList.push_front(module);
            module = "";
        }
    }

I am getting a segfault on the modType = tempMod->getType(); line.  I'm using
1.9.0 built myself. I'm not sure what I'm doing wrong.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20231024/9c531d58/attachment.sig>


More information about the sword-devel mailing list