Hello, How can I test whether an igraph_t variable has been initialised already?
I'm getting a segfault when I call igraph_destroy on an uninitialised graph. I would have expected that igraph_destroy would simply not do anything in this case, but given that igraph_destroy seems to assume a pre-initialised graph, how can I avoid the segfault? It's not possible for me to know at compile-time whether the graph in question has been initialised. It depends on user input, which selects between various graph operations using function pointers. Most of these function pointers result in an initialised graph, but sometimes not. Regardless of user input, I'd like to ensure I destroy all graphs whenever they exist before the program exits. If my meaning isn't clear and you need some example minimal code, let me know and I'll see what I can cook up :-) Cheers, Tim Rice -- PhD Candidate A: Room 210, Richard Berry (Maths & Stats), Melbourne University E: [email protected] W: http://www.ms.unimelb.edu.au/~trice
pgpLFbwcKeTTI.pgp
Description: PGP signature
_______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
