mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-29 16:11:37 -04:00
Avoid exception if class ID is not found, instead don't show any fields in the gui.
This commit is contained in:
parent
aaa80d1eb0
commit
e6ad68b8d0
@ -240,7 +240,9 @@ void PickClassDialog::updateStats()
|
|||||||
return;
|
return;
|
||||||
WindowManager *wm = environment.mWindowManager;
|
WindowManager *wm = environment.mWindowManager;
|
||||||
ESMS::ESMStore &store = environment.mWorld->getStore();
|
ESMS::ESMStore &store = environment.mWorld->getStore();
|
||||||
const ESM::Class *klass = store.classes.find(currentClassId);
|
const ESM::Class *klass = store.classes.search(currentClassId);
|
||||||
|
if (!klass)
|
||||||
|
return;
|
||||||
|
|
||||||
ESM::Class::Specialization specialization = static_cast<ESM::Class::Specialization>(klass->data.specialization);
|
ESM::Class::Specialization specialization = static_cast<ESM::Class::Specialization>(klass->data.specialization);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user