mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 982475 - Prevent SwapRAndBComponents derefencing NULL pointer. r=jgilbert
This commit is contained in:
parent
b2f5789c43
commit
0380da9a54
@ -209,6 +209,10 @@ GetActualReadFormats(GLContext* gl,
|
||||
static void SwapRAndBComponents(DataSourceSurface* surf)
|
||||
{
|
||||
uint8_t *row = surf->GetData();
|
||||
if (!row) {
|
||||
MOZ_ASSERT(false, "SwapRAndBComponents: Failed to get data from DataSourceSurface.");
|
||||
return;
|
||||
}
|
||||
|
||||
size_t rowBytes = surf->GetSize().width*4;
|
||||
size_t rowHole = surf->Stride() - rowBytes;
|
||||
|
Loading…
Reference in New Issue
Block a user