getPlatformDisplayAngle: Fix std::vector scope error
The std::vector<const char*> variables were scoped to only within the conditional blocks for graphicsenv_flags::feature_overrides(). However, pointers to those vectors were added to the std::vector<EGLAttrib> attrs which is passed to eglGetPlatformDisplay(), leading to a use-after-free and ANGLE crashing due to a SIGSEGV. Move the declarations of enabled/disabled std::vectors next to attrs so their lifetimes match. Also, add a comment about why they are declared there, so they aren't erroneously moved back inside the conditional blocks where they are used in the future. Bug: 372694741 Test: CQ, Manual verification Flag: com.android.graphics.graphicsenv.flags.feature_overrides Change-Id: I85a361819e082bc546933e2839e3741a6b4c4ffd
Loading
Please register or sign in to comment