Skip to content

Commit

Permalink
Fixes 288 - xinerama crashing bug on non-xinerama screens
Browse files Browse the repository at this point in the history
There's a possibility of a null pointer returned by
XRRGetScreenResources in mod_xrandr_get_outputs_for_geom. It wasn't
getting checked. Now it is.
  • Loading branch information
kristopolous committed Jun 7, 2020
1 parent bc4f865 commit 877c3c2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod_xrandr/mod_xrandr.c
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ ExtlTab mod_xrandr_get_outputs_for_geom(ExtlTab geom)
XRRScreenResources *res = XRRGetScreenResources(ioncore_g.dpy, ioncore_g.rootwins->dummy_win);
ExtlTab result = extl_create_table();

if (!res) {
return result;
}

for(i=0; i < res->noutput; i++){
int x,y;
int w,h;
Expand Down

0 comments on commit 877c3c2

Please sign in to comment.