Remove tab only if tab exists.

Prevent crash in ActionBarTabs(ApiDemos).

Change-Id: I1972fc761e8ebf245afb828fe7595bc764eaae56
diff --git a/samples/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.java b/samples/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.java
index 11c1bc2..df6752c 100644
--- a/samples/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.java
+++ b/samples/ApiDemos/src/com/example/android/apis/app/ActionBarTabs.java
@@ -52,7 +52,9 @@
 
     public void onRemoveTab(View v) {
         final ActionBar bar = getActionBar();
-        bar.removeTabAt(bar.getTabCount() - 1);
+        if (bar.getTabCount() > 0) {
+            bar.removeTabAt(bar.getTabCount() - 1);
+        }
     }
 
     public void onToggleTabs(View v) {