minui: Fix breakage in graphics_adf.
When graphics_adf was refactored in 557fa1f
, a class member was introduced
that was not initialized to zero. This meant that the first time Flip()
was called, current_surface would have a junk value and cause a bad
pointer rereference, crashing recovery.
Make sure current_surface is initialized to 0 for the first Flip().
Test: Ran recovery on a device using the ADF backend.
Change-Id: I9b8fac0a4d48cac990e5e9808a071c232de1ebfb
This commit is contained in:
parent
0481faef77
commit
4697d8b11b
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,8 @@
|
|||
|
||||
#include "minui/minui.h"
|
||||
|
||||
MinuiBackendAdf::MinuiBackendAdf() : intf_fd(-1), dev(), n_surfaces(0), surfaces() {}
|
||||
MinuiBackendAdf::MinuiBackendAdf()
|
||||
: intf_fd(-1), dev(), current_surface(0), n_surfaces(0), surfaces() {}
|
||||
|
||||
int MinuiBackendAdf::SurfaceInit(const drm_mode_modeinfo* mode, GRSurfaceAdf* surf) {
|
||||
*surf = {};
|
||||
|
|
Loading…
Reference in a new issue