Browse Source

Unset pixel buffer when x0vncserver client disconnects.

In XDesktop::start() we allocate pixel buffer and set it as the backend to the given VNCServer.
In XDesktop::stop() we deallocate the buffer, so we must unset it from the VNCServer as well.
Otherwise the VNCServer could try to access it and crash, for example in deferred update.
tags/v1.8.90
Michal Srb 6 years ago
parent
commit
18a77077de
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      unix/x0vncserver/XDesktop.cxx

+ 5
- 1
unix/x0vncserver/XDesktop.cxx View File

@@ -166,7 +166,8 @@ XDesktop::XDesktop(Display* dpy_, Geometry *geometry_)
}

XDesktop::~XDesktop() {
stop();
if (running)
stop();
}


@@ -227,6 +228,9 @@ void XDesktop::stop() {
XDamageDestroy(dpy, damage);
#endif

server->setPixelBuffer(0);
server = 0;

delete pb;
pb = 0;
}

Loading…
Cancel
Save