Thanks to everyone for their help so far !
matsp was correct, it was a non-NULL pointer error. I've now added
Code:
next = NULL;
prev = NULL;
to my constructors, and that's solved the problem - only to reveal a further segfault, a little further down the line.
Line is now 292, giving the same error. I'm trying to get my head around which part I messed up this time :P
Code:
else // If it dies this turn, create link between nodes and destroy current node
{
mortals->next->prev = mortals->prev; // The next node's previous pointer points to the previous node
// FOLLOWING LINE CAUSES SEG FAULT
mortals->prev->next = mortals->next; // The previous node's next pointer points to the next node
mortals->~Mortal(); // Call Destructor
deaths++;
}
If anyone sees something drastically obvious, please feel free to point it out. If not, I might work it out myself in a few
[EDIT]
Would it be something to do with mortals->next not having a value ( non-NULL, again ) ? *Checks*
[/EDIT]