JakeWharton/ActionBarSherlock — pull request #161 by jondwillis (2012-01-03 22:38:59+00:00)
Title: NullPointerException in FragmentManager.saveFragmentBasicState(...)

FragmentManager: prevented NullPointerException when saving some types
of Fragments where mSavedViewState is null and mUserVisibleHint is
false.
================
Instances of this class were causing the NPE:

public abstract class LayoutFragment extends Fragment {

public static LayoutFragment newInstance(final int layoutId) {
return new LayoutFragment() {
@Override
public int getLayoutResourceId() {
return layoutId;
}
};
}

public abstract int getLayoutResourceId();

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
return inflater.inflate(getLayoutResourceId(), container, false);
}
}