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.
This commit is contained in:
parent
a65511a32e
commit
64eb8cd6a9
1 changed files with 5 additions and 5 deletions
|
@ -311,7 +311,8 @@ void WinButton::drawType() {
|
||||||
void WinButton::clear() {
|
void WinButton::clear() {
|
||||||
FbTk::Button::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.drawable() ||
|
||||||
(m_icon_pixmap.width() != width() - 4 ||
|
(m_icon_pixmap.width() != width() - 4 ||
|
||||||
m_icon_pixmap.height() != height() - 4))) {
|
m_icon_pixmap.height() != height() - 4))) {
|
||||||
|
@ -345,9 +346,8 @@ void WinButton::clear() {
|
||||||
|
|
||||||
void WinButton::update(FbTk::Subject *subj) {
|
void WinButton::update(FbTk::Subject *subj) {
|
||||||
|
|
||||||
|
|
||||||
// just checking, if we the app provides a pixmap.
|
// 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(),
|
XWMHints* hints = XGetWMHints(m_listen_to.fbWindow().display(),
|
||||||
m_listen_to.winClient().window());
|
m_listen_to.winClient().window());
|
||||||
if (hints == 0) {
|
if (hints == 0) {
|
||||||
|
|
Loading…
Reference in a new issue