diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index d1e13e3f1..e08afb595 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -22,13 +22,15 @@ */ #include +#include + #include "randr/randrstr_priv.h" #include "randr/rrdispatch_priv.h" +#include "os/bug_priv.h" #include "swaprep.h" #include "mipointer.h" -#include RESTYPE RRCrtcType = 0; @@ -184,10 +186,13 @@ RRCrtcNotify(RRCrtcPtr crtc, crtc->outputs = newoutputs; crtc->numOutputs = numOutputs; } + /* * Copy the new list of outputs into the crtc */ + BUG_RETURN_VAL(outputs == NULL, FALSE); memcpy(crtc->outputs, outputs, numOutputs * sizeof(RROutputPtr)); + /* * Update remaining crtc fields */ @@ -749,6 +754,8 @@ RRCrtcSet(RRCrtcPtr crtc, Bool crtcChanged; int o; + BUG_RETURN_VAL(outputs == NULL, FALSE); + rrScrPriv(pScreen); crtcChanged = FALSE;