Skip to content

Commit

Permalink
Add null check on mImageReader (google#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
dumazy authored and yaraki committed Oct 21, 2016
1 parent e5eddec commit f230fd8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ buildscript {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.0'
classpath 'com.android.tools.build:gradle:2.2.1'

// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ private void startOpeningCamera() {
* <p>The result will be continuously processed in {@link #mSessionCallback}.</p>
*/
void startCaptureSession() {
if (!isCameraOpened() || !mPreview.isReady()) {
if (!isCameraOpened() || !mPreview.isReady() || mImageReader == null) {
return;
}
Size previewSize = chooseOptimalSize();
Expand Down

0 comments on commit f230fd8

Please sign in to comment.