ashqal / MD360Player4Android

It is a lite library to render 360 degree panorama video for Android. VR Player.
Apache License 2.0
1.08k stars 357 forks source link

Crashed when select ANTI-ENABLE item #177

Closed lookfuyao closed 7 years ago

lookfuyao commented 7 years ago

不是MainPlugin里面的MD360Director是没有初始mDirectorFilter的。 加个null!=mDirectorFilter的判断就可以了。

01-17 02:59:15.618 22214-22295/com.asha.md360player4android E/AndroidRuntime: FATAL EXCEPTION: GLThread 562
                                                                              Process: com.asha.md360player4android, PID: 22214
                                                                              java.lang.NullPointerException: Attempt to invoke virtual method 'float com.asha.vrlib.MDDirectorFilter.onFilterPitch(float)' on a null object reference
                                                                                  at com.asha.vrlib.MD360Director.updateViewMatrixIfNeed(MD360Director.java:126)
                                                                                  at com.asha.vrlib.MD360Director.beforeShot(MD360Director.java:77)
                                                                                  at com.asha.vrlib.plugins.MDBarrelDistortionLinePipe.draw(MDBarrelDistortionLinePipe.java:107)
                                                                                  at com.asha.vrlib.plugins.MDBarrelDistortionLinePipe.commit(MDBarrelDistortionLinePipe.java:93)
                                                                                  at com.asha.vrlib.MD360Renderer.onDrawFrame(MD360Renderer.java:129)
                                                                                  at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1548)
                                                                                  at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1259)
ashqal commented 7 years ago

https://github.com/ashqal/MD360Player4Android/commit/cce76cc056a2e268965e93dfc13db8a6aa81ab27

之前已经修复啦