Index: platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java |
diff --git a/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java b/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java |
index f54b7d97466d040f4cb50d7bae2d90a92718f864..894a9b33916f5d1cb5f44217085b1fe5e6904901 100644 |
--- a/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java |
+++ b/platform_tools/android/apps/visualbenchsdl/src/main/java/com/skia/VisualBenchActivity.java |
@@ -13,10 +13,10 @@ import android.content.Intent; |
public class VisualBenchActivity extends SDLActivity { |
protected String[] getArguments() { |
- // intent get intent extras if triggered from the command line |
- Intent intent = this.getIntent(); |
- String flags = intent.getStringExtra("cmdLineFlags"); |
- |
- return flags.split("\\s+"); |
+ String flags = this.getIntent().getStringExtra("cmdLineFlags"); |
+ if (flags != null && !flags.isEmpty()) { |
+ return flags.split("\\s+"); |
+ } |
+ return new String[0]; |
} |
} |