Fix issue where Google Voice shortcuts would disappear

Bug: 6449123

Change-Id: I1d8c314ec954caf332d10be927d16ee45f325df8
diff --git a/src/com/android/launcher2/LauncherModel.java b/src/com/android/launcher2/LauncherModel.java
index bc88a98..fc1a26d 100644
--- a/src/com/android/launcher2/LauncherModel.java
+++ b/src/com/android/launcher2/LauncherModel.java
@@ -1089,7 +1089,9 @@
 
                                 // App shortcuts that used to be automatically added to Launcher
                                 // didn't always have the correct intent flags set, so do that here
-                                if (intent.getAction().equals(Intent.ACTION_MAIN) &&
+                                if (intent.getAction() != null &&
+                                        intent.getCategories() != null &&
+                                        intent.getAction().equals(Intent.ACTION_MAIN) &&
                                         intent.getCategories().contains(Intent.CATEGORY_LAUNCHER)) {
                                     intent.addFlags(
                                         Intent.FLAG_ACTIVITY_NEW_TASK |