fixed crash upon opening of random pack panel

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1569 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2010-12-30 17:07:54 +00:00
parent 809d9b747a
commit 3c49eb1889
+2
View File
@@ -466,6 +466,7 @@ void RandomPackPanel::onChangeSet() {
seed_fixed ->SetValue(!gs.pack_seed_random);
seed->Enable(!gs.pack_seed_random);
setSeed(gs.pack_seed);
generator.set = SetP(); // prevent spurious events
FOR_EACH(pick, pickers) {
pick.value->SetValue(gs.pack_amounts[pick.pack->name]);
}
@@ -559,6 +560,7 @@ void RandomPackPanel::onPackTypeClick(wxCommandEvent& ev) {
// ----------------------------------------------------------------------------- : Generating
void RandomPackPanel::updateTotals() {
if (!generator.set) return; // not initialized
generator.reset(last_seed);
int total_packs = 0;
FOR_EACH(pick,pickers) {