mirror of https://github.com/mpv-player/mpv
geometry: remove useless NULL check
Remove useless checks, the code would crash all over of widw/widh were NULL. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@35292 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
334db4cad2
commit
3bebbe066d
|
@ -90,8 +90,8 @@ int geometry(int *xpos, int *ypos, int *widw, int *widh, int scrw, int scrh)
|
||||||
"height: %i, xoff: %s%i, yoff: %s%i, xper: %i, yper: %i\n",
|
"height: %i, xoff: %s%i, yoff: %s%i, xper: %i, yper: %i\n",
|
||||||
width, height, xsign, xoff, ysign, yoff, xper, yper);
|
width, height, xsign, xoff, ysign, yoff, xper, yper);
|
||||||
|
|
||||||
if (width > 0 && widw) *widw = width;
|
if (width > 0) *widw = width;
|
||||||
if (height > 0 && widh) *widh = height;
|
if (height > 0) *widh = height;
|
||||||
|
|
||||||
if(xoff != INT_MIN && xsign[0] == '-') xoff = scrw - *widw - xoff;
|
if(xoff != INT_MIN && xsign[0] == '-') xoff = scrw - *widw - xoff;
|
||||||
if(yoff != INT_MIN && ysign[0] == '-') yoff = scrh - *widh - yoff;
|
if(yoff != INT_MIN && ysign[0] == '-') yoff = scrh - *widh - yoff;
|
||||||
|
|
Loading…
Reference in New Issue