Bug 949004 - Check to see if lock is null before using it. r=qDot

--HG--
extra : rebase_source : 115a50601853376ae1a0548aad4d61f58e96c8d1