[sword-devel] Crash when getting module type
David "Judah's Shadow" Blue
yudahsshadow at gmx.com
Fri Oct 27 12:33:24 EDT 2023
On Friday, October 27, 2023 8:46:19 AM EDT Troy A. Griffitts wrote:
> Hi David. There shouldn't be any nulls in the SWMgr::Modules map. Have you
> done anything with the map which might have created an entry? For example,
> have you attempted to obtain a module by name which wasn't there? In C++
> this would create an empty entry with a null pointer if the KJV wasn't
> installed.
>
> SWModule *kjv = swordLibrary->Modules["KJV"];
>
> Just trying to guess what might have happened.
No, I'm declaring the SWModule *tempMod and then the very next thing is
assigning it to libraryIterator->second.
libraryIterator is a sword::ModMap::iterator if that makes a difference.
While stepping through in my debugger, after I assign tempMod to
libraryIterator->second looking at the variables, I am getting values in
tempMod that indicate something is wrong (I can provide those if that would
help)
Ultimately, I want to build a list of strings of the form "For [module
description/long name select [module shortname] for all installed modules of a
given type. Perhaps there is a better way to do that?
-------------- 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/20231027/bc5cfaa9/attachment.sig>
More information about the sword-devel
mailing list