Fixed some Visual Studio analyze warnings
This commit is contained in:
parent
6971a5dd1c
commit
de9566518f
3 changed files with 24 additions and 18 deletions
|
@ -1202,7 +1202,11 @@ SDL_SW_LockYUVTexture(SDL_SW_YUVTexture * swdata, const SDL_Rect * rect,
|
|||
break;
|
||||
}
|
||||
|
||||
*pixels = swdata->planes[0] + rect->y * swdata->pitches[0] + rect->x * 2;
|
||||
if (rect) {
|
||||
*pixels = swdata->planes[0] + rect->y * swdata->pitches[0] + rect->x * 2;
|
||||
} else {
|
||||
*pixels = swdata->planes[0];
|
||||
}
|
||||
*pitch = swdata->pitches[0];
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue