Check that amrd_sc is non-NULL before dereferencing it, not after.
Check that amrd_sc is non-NULL before dereferencing it, not after.

Reported by:	"Ted Unangst" <tedu@coverity.com>
Approved by:	rwatson (mentor)

jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase