mirror of
https://github.com/UberGames/ioef.git
synced 2024-11-28 06:52:35 +00:00
Fix to (#5051) - strchr in GraphicsOptions_GetAspectRatios() might return NULL for some strange reason
This commit is contained in:
parent
90ede2cb48
commit
6a3142d2c1
1 changed files with 4 additions and 0 deletions
|
@ -428,6 +428,10 @@ static void GraphicsOptions_GetAspectRatios( void )
|
||||||
|
|
||||||
// calculate resolution's aspect ratio
|
// calculate resolution's aspect ratio
|
||||||
x = strchr( resolutions[r], 'x' ) + 1;
|
x = strchr( resolutions[r], 'x' ) + 1;
|
||||||
|
|
||||||
|
if(!x)
|
||||||
|
continue;
|
||||||
|
|
||||||
Q_strncpyz( str, resolutions[r], x-resolutions[r] );
|
Q_strncpyz( str, resolutions[r], x-resolutions[r] );
|
||||||
w = atoi( str );
|
w = atoi( str );
|
||||||
h = atoi( x );
|
h = atoi( x );
|
||||||
|
|
Loading…
Reference in a new issue