A few fixes for recent own commit r56133.

* Index was assigned after increment, leading to NULL pointer access later on when looking up socket from list
* Copying default_value requires a valid NULL pointer for clean check
* Was using default_values as parameters instead of sockets, void pointers just passed through without warning ...

git-svn-id: https://svn.blender.org/svnroot/bf-blender/trunk/blender@56140 954f8c5b-7b00-dc11-b283-0030488c597c