fix #2023: mGridAdapter was called before creation

fix #2023: mGridAdapter was called before creation

To reproduce the issue before the fix:
1. Create a gallery from the media library
1. Tap the plus button to add another image to the gallery: crash