PAL: Check if stream_handle is valid before accessing

Check the stream_handle before accessing to avoid fault addr issue.
crash exception will happen if stream handle is invalid though
address of stream handle is not null.

Change-Id: I2d21587758524d69274dc7e3fabcf426d816f8a5
1 file changed