test for null (though should not be required to fix this)

This commit is contained in:
Eric House 2014-07-30 07:05:49 -07:00
parent f093aba1a6
commit f01d12035b

View file

@ -160,9 +160,11 @@ public class Toolbar {
int id = isLandscape ? R.id.tbar_parent_vert : R.id.tbar_parent_hor;
ViewGroup scroller = (ViewGroup)m_activity.findViewById( id );
// Google's had reports of a crash adding second view
scroller.removeAllViews();
scroller.addView( m_layout ); // failing
if ( null != scroller ) {
// Google's had reports of a crash adding second view
scroller.removeAllViews();
scroller.addView( m_layout ); // failing
}
}
m_layout.setVisibility( m_visible? View.VISIBLE : View.GONE );