BUG: Fixed crash in vtkMRMLNode reference adding

Crashed when attempting to add a new reference with NULL referenced node pointer.

Caused the vtkMRMLNodeTest1 dashboard test to fail:

http://slicer.cdash.org/testDetails.php?test=5647387&build=259092

Test: vtkMRMLNodeTest1 (Failed) 
Build: Windows7-VS2008-64bits-QT4.8.6-NoVTKDebugLeaks-NoConsole-Release (factory-south-win7.kitware) on 2014-08-16 00:08:18
Repository revision: 23570

C:\D\N\Slicer-1-build\Slicer-build\Slicer.exe "--launcher-no-splash" "--launch" "C:/D/N/Slicer-1-build/Slicer-build/bin/Release/MRMLCoreCxxTests.exe" "vtkMRMLNodeTest1"


Test outputvtkMRMLNodeTestHelper1 (00000000038A8CA0)
  Debug: Off
  Modified Time: 16
  Reference Count: 1
  Registered Events: (none)
  ID: (none)
  Indent:      0
  Name: (none)
  Description: (none)
  SingletonTag: (none)
  HideFromEditors: 0
  Selectable: 1
  Selected: 0

Name of Class = vtkMRMLNodeTestHelper1
Name of Superclass = vtkMRMLNodeTestHelper1
WriteXML output:
 id="vtkMRMLNodeTest1" name="MyName" description="Testing a mrml node" hideFromEditors="false" selectable="true" selected="true" attributes="attName:attValue"
ERROR: In ..\..\..\..\..\Slicer-1\Libs\MRML\Core\vtkMRMLNode.cxx, line 815
vtkMRMLNodeTestHelper1 (00000000038A0080): GetAttribute: Name parameter is expected to be non NULL.

ERROR: In ..\..\..\..\..\Slicer-1\Libs\MRML\Core\vtkMRMLNode.cxx, line 820
vtkMRMLNodeTestHelper1 (00000000038A0080): GetAttribute: Name parameter is expected to have at least one character.

error: [C:/D/N/Slicer-1-build/Slicer-build/bin/Release/MRMLCoreCxxTests.exe] exit abnormally - Report the problem.


git-svn-id: http://svn.slicer.org/Slicer4/trunk@23586 3bd1e089-480b-0410-8dfb-8563597acbee