new code in WinButton was assuming that at ::clear() - time there is always a valid m_listen_to.winClient() .. which is not true under some circumstance. i guarded the code accordingly.
mathias mathias
1 files changed,
5 insertions(+),
5 deletions(-)
jump to
M
src/WinButton.cc
→
src/WinButton.cc
@@ -310,8 +310,9 @@ }
void WinButton::clear() { FbTk::Button::clear(); - - if (m_type == MENUICON && ( + + // ensure the m_listen_to has actually a client + if (m_type == MENUICON && m_listen_to.numClients() && ( !m_icon_pixmap.drawable() || (m_icon_pixmap.width() != width() - 4 || m_icon_pixmap.height() != height() - 4))) {@@ -339,15 +340,14 @@ }
XFree(hints); } - + drawType(); } void WinButton::update(FbTk::Subject *subj) { - // just checking, if we the app provides a pixmap. - if (m_type == MENUICON) { + if (m_type == MENUICON && m_listen_to.numClients()) { XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(), m_listen_to.winClient().window()); if (hints == 0) {