From c62dc1e2afbf28d59b472ef720f338edb2ef463b Mon Sep 17 00:00:00 2001 From: rathnor Date: Mon, 19 May 2003 08:27:49 +0000 Subject: fix initialise of s_display in a constructor for FbWindow (fixes bsetroot segfault) --- ChangeLog | 3 +++ src/FbTk/FbWindow.cc | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 590d6b4..6efe266 100644 --- a/ChangeLog +++ b/ChangeLog @@ -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) diff --git a/src/FbTk/FbWindow.cc b/src/FbTk/FbWindow.cc index 5634a5d..ed97ecc 100644 --- a/src/FbTk/FbWindow.cc +++ b/src/FbTk/FbWindow.cc @@ -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; -- cgit v0.11.2