diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java index a13f92704..e624f2643 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/Toolbar.java @@ -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 );