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:
parent
782f116d7c
commit
10e1a9071e
8 changed files with 12 additions and 9 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue