Project

General

Profile

« Previous | Next » 

Revision fdb60725

Added by Leszek Koltunski over 3 years ago

Correct an issue shown by Crashlytics: sometimes it would crash in the library in InternalOutputSurface.setAsOutput() when trying to 'read from null array' mFBOH[].

View differences:

src/main/java/org/distorted/library/main/InternalOutputSurface.java
98 98

  
99 99
    mTmpFBO = fbo;
100 100

  
101
    mFBOH = new int[10];  // Crashlytics shows the library occasionally crashing in setAsOutput()
102
    mTime = new long[10]; // when trying to read from 'null array' mFBOH. Probably sometimes a
103
                          // a Framebuffer gets created in the wrong moment, just after we did a
104
                          // round of create(), but before we start rendering.
105
                          // Create an empty FBO and Time here so that setAsOutput() is always safe to call.
106

  
101 107
    allocateStuffDependantOnNumFBOS();
102 108
    createProjection();
103 109
    }

Also available in: Unified diff