Are you sure this is the particular line which is giving you the problem?
I'd suggest making some cout statements and seeing what variables are being passed.
Or comment out functions line by line until you get the core dumped error;
then you know where something fucky is happening.