Frameworks: fix possible NPE

due a race condition this can happen....prevend it

cheers

Change-Id: I65222389c6b0beecaebed915644ab5e800c5f119
Merge remote-tracking branch 'slim/jb4.2' into mirage