Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cbd37898 authored by Jesse Hall's avatar Jesse Hall Committed by Android Git Automerger
Browse files

am ab10f3c5: Merge "Restore a mistakenly-removed null check"

* commit 'ab10f3c5':
  Restore a mistakenly-removed null check
parents be88cb1d ab10f3c5
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -537,7 +537,10 @@ static void android_hardware_Camera_setPreviewDisplay(JNIEnv *env, jobject thiz,
    sp<Camera> camera = get_native_camera(env, thiz, NULL);
    if (camera == 0) return;

    sp<Surface> surface = android_view_Surface_getSurface(env, jSurface);
    sp<Surface> surface;
    if (jSurface) {
        surface = android_view_Surface_getSurface(env, jSurface);
    }

    if (camera->setPreviewDisplay(surface) != NO_ERROR) {
        jniThrowException(env, "java/io/IOException", "setPreviewDisplay failed");