fix initialise of s_display in a constructor for FbWindow (fixes bsetroot

segfault)
This commit is contained in:
rathnor 2003-05-19 08:27:49 +00:00
parent 80161fc208
commit c62dc1e2af
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,8 @@
(Format: Year/Month/Day)
Changes for 0.9.3:
*03/05/19:
* Fix bsetroot segfault (Simon)
FbWindow.cc
*03/05/18:
* Moved Resource.hh/cc, DirHelper.hh/cc and
XrmDatabaseHelper.hh to FbTk (Henrik)

View file

@ -19,7 +19,7 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
// $Id: FbWindow.cc,v 1.18 2003/05/17 10:43:20 fluxgen Exp $
// $Id: FbWindow.cc,v 1.19 2003/05/19 08:27:49 rathnor Exp $
#include "FbWindow.hh"
#include "EventManager.hh"
@ -121,6 +121,9 @@ FbWindow &FbWindow::operator = (Window win) {
}
void FbWindow::setNew(Window win) {
if (s_display == 0)
s_display = App::instance()->display();
if (m_window != 0 && m_destroy)
XDestroyWindow(s_display, m_window);
m_window = win;