diff options
author | Fate <fate.tmw@googlemail.com> | 2008-11-01 22:39:26 +0000 |
---|---|---|
committer | Fate <fate.tmw@googlemail.com> | 2008-11-01 22:39:26 +0000 |
commit | 4cfdb3620ccbd0de6bd53c5f22e7b6d3801627bf (patch) | |
tree | 20471d3a652d35a193b6c9873b45eded59bd3e63 /src/gui/table.cpp | |
parent | 885a9c145464a2b376edfd1c9677b84f6d4a8ce5 (diff) | |
download | mana-client-4cfdb3620ccbd0de6bd53c5f22e7b6d3801627bf.tar.gz mana-client-4cfdb3620ccbd0de6bd53c5f22e7b6d3801627bf.tar.bz2 mana-client-4cfdb3620ccbd0de6bd53c5f22e7b6d3801627bf.tar.xz mana-client-4cfdb3620ccbd0de6bd53c5f22e7b6d3801627bf.zip |
* Updated GUI table and model to better handle NULL widgets during initialisation
* On SMSG_MOVE et al., ignore boots and glove information-- that information is incorrect and we're guaranteed to already have the correct information anyway.
* Properly decode `is dead' information for PCs, so that dead players, when encountered, will be lying on the ground, dead, rather than standing.
* Use `skills.xml' file from client data to determine skill names
* Report client version number (hereby bumped to 1) in unused charserver slot (ignored by vanilla eAthena)
Diffstat (limited to 'src/gui/table.cpp')
-rw-r--r-- | src/gui/table.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/gui/table.cpp b/src/gui/table.cpp index 89a93825..bddfbfed 100644 --- a/src/gui/table.cpp +++ b/src/gui/table.cpp @@ -105,8 +105,10 @@ GuiTable::setModel(TableModel *new_model) mModel = new_model; installActionListeners(); - new_model->installListener(this); - recomputeDimensions(); + if (new_model) { + new_model->installListener(this); + recomputeDimensions(); + } } @@ -187,6 +189,9 @@ GuiTable::uninstallActionListeners(void) void GuiTable::installActionListeners(void) { + if (!mModel) + return; + int rows = mModel->getRows(); int columns = mModel->getColumns(); @@ -367,7 +372,7 @@ GuiTable::getWidgetAt(int x, int y) if (row > -1 && column > -1) { gcn::Widget *w = mModel->getElementAt(row, column); - if (w->isFocusable()) + if (w && w->isFocusable()) return w; else return NULL; // Grab the event locally |