Fixed #5864: Fixed crash issue when handleOnPause get invoked before onSurfaceCreated