am f29471c7: Merge "Ensure that crop view is loaded before applying a wallpaper" into ub-launcher3-burnaby

* commit 'f29471c751b173b91989709b9ce9ca811bf20244':
  Ensure that crop view is loaded before applying a wallpaper
diff --git a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
index 069638f..75d8745 100644
--- a/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
+++ b/WallpaperPicker/src/com/android/launcher3/WallpaperPickerActivity.java
@@ -550,7 +550,8 @@
                 new View.OnClickListener() {
                     @Override
                     public void onClick(View v) {
-                        if (mSelectedTile != null) {
+                        // Ensure that a tile is slelected and loaded.
+                        if (mSelectedTile != null && mCropView.getTileSource() != null) {
                             // Prevent user from selecting any new tile.
                             mWallpaperStrip.setVisibility(View.GONE);
                             actionBar.hide();