[libxml++] Segfault with node->find()



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

If I use something like:

xmlpp::NodeSet found;
const xmlpp::TextNode* node_text;
found = node->find( "./some/valid/path" );
node_text = dynamic_cast<const xmlpp::TextNode*>(found[0]);

Everything is fine.

However, this:

found = node->find( "./some/INVALID/path" );

produces a segfault.

Am I doing something wrong? gdb isn't hugely helpful because I just get
tied up in inlined template functions for vector and there's a segfault
_somewhere_ in them!

Do I need to check beforehand whether there's anything at the end of the
path?

Thanks in advance,

Rupert
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iQCVAwUBQqyuSEbXf6SW2FaGAQIZ8wP/Qv9u79bRRpLaEAhuCYEtCO7+qcOjx2C3
ygRQzNFfSMXajhDA/CFw8ZbC80rAS1AwhYit3JZmXiIsO/dD127xKvC5PPcN8Rr2
ouqgkeZyXXGThm1kayV02L/DX/VBcbnB043Mpp/f/t0YBPUObJXviR5xcywgTBTt
r/CLDsoxoks=
=G9Lo
-----END PGP SIGNATURE-----




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]