Fix thread lock on getPixels exception.