diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index b828b7301..55e32ae82 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -20,12 +20,16 @@ * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE * OF THIS SOFTWARE. */ +#include + +#include + +#include "os/bug_priv.h" #include "randrstr_priv.h" #include "swaprep.h" #include "mipointer.h" -#include RESTYPE RRCrtcType = 0; @@ -181,10 +185,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 */ @@ -735,6 +742,8 @@ RRCrtcSet(RRCrtcPtr crtc, Bool crtcChanged; int o; + BUG_RETURN_VAL(outputs == NULL, FALSE); + rrScrPriv(pScreen); crtcChanged = FALSE;