Merge "Fix NPE because of concurrent access in both GL and main threads." into jb-dev