summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--randr/rrmode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/randr/rrmode.c b/randr/rrmode.c
index 212175f1d..d5072084a 100644
--- a/randr/rrmode.c
+++ b/randr/rrmode.c
@@ -85,6 +85,11 @@ RRModeCreate (xRRModeInfo *modeInfo,
return NULL;
modes = newModes;
modes[num_modes++] = mode;
+
+ /*
+ * give the caller a reference to this mode
+ */
+ ++mode->refcnt;
return mode;
}