Are you using the correct libraries (in <agkdir>\Tier 2\platform\windows\Lib\VS2013)?
Have you tried using the debugger to watch values?
Are you sure that mVecNodes is getting initialized? And how is it defined?
As a general coding recommendation (I've been programming professionally for 38 years), if there is more than one logical thing in an 'if' statement, it is a good idea to group things with parenthesis to make sure that the code gets done in the order you want.
For instance, this "if(node1 != nullptr && node2 != nullptr)" would be better written as "if ((node1 != nullptr) && (node2 != nullptr))".
While compilers should follow the expected operator precedence, I've discovered that they sometimes don't.
Cheers,
Ancient Lady