1
0
Fork 0

Platform/Unix/X11SharedDisplay: pass a pointer to the display to XReleaseDisplay() just to be sure client code has a valid pointer

This commit is contained in:
Henrik Hautakoski 2020-10-17 14:18:41 +02:00
parent 782f116d7c
commit 10e1a9071e
8 changed files with 12 additions and 9 deletions

View file

@ -1,4 +1,5 @@
#include <assert.h>
#include "X11SharedDisplay.h"
namespace sp {
@ -18,7 +19,9 @@ unsigned int refcount = 0;
return sharedDisplay;
}
void XReleaseDisplay() {
void XReleaseDisplay(::Display* disp) {
assert(disp == sharedDisplay);
if (refcount < 1) {
return;