summaryrefslogtreecommitdiff
path: root/randr/rroutput.c
diff options
context:
space:
mode:
Diffstat (limited to 'randr/rroutput.c')
-rw-r--r--randr/rroutput.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c
index 48b5700c8..82c2530fe 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -380,6 +380,9 @@ RROutputDestroyResource (pointer value, XID pid)
{
rrScrPriv(pScreen);
int i;
+
+ if (pScrPriv->primaryOutput == output)
+ pScrPriv->primaryOutput = NULL;
for (i = 0; i < pScrPriv->numOutputs; i++)
{