Fixing a crash when the fragment is not attached to the Activity.
Merge pull request #6 from mdzyuba/fix_crash_in_unattached_fragment

Fixing a crash when the fragment is not attached to the Activity.