commit 12324f74c9ef5810dee2b6e388cd51a0e9be4f1d
parent f6d8b8faad51b121b362ee6135bc1b48ea21604e
Author: fundamental <[email protected]>
Date: Sun, 19 Oct 2014 21:42:04 -0400
Avoid Problematic Bank Initialization
Diffstat:
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/src/UI/BankUI.fl b/src/UI/BankUI.fl
@@ -102,7 +102,8 @@ refreshmainwindow();}
fl_alert("Error: Could not load the bank from the directory\\n%s.",dirname.c_str());*/
refreshmainwindow();}
xywh {5 8 220 20} down_box BORDER_BOX labelfont 1 align 0 textfont 1 textsize 11
- code0 {o->init("loadbank");}
+ code0 {bankview->init(osc, modeselect, npart);}
+ code1 {o->init("loadbank");}
class BankList
} {}
Fl_Button {} {
@@ -115,10 +116,10 @@ banklist->value(0);}
}
Function {BankUI(int *npart_, Fl_Osc_Interface *osc_)} {open
} {
- code {npart=*npart_;
+ code {npart=npart_;
osc =osc_;
make_window();
-bankview->init(osc, modeselect, npart_);} {}
+} {}
}
Function {~BankUI()} {open return_type virtual
} {
@@ -170,6 +171,6 @@ if (banklist->size() == 0)
}
decl {Fl_Valuator *cbwig;} {public local
}
- decl {int npart;} {private local
+ decl {int *npart;} {private local
}
}
diff --git a/src/UI/BankView.cpp b/src/UI/BankView.cpp
@@ -313,6 +313,7 @@ void BankView::OSC_raw(const char *msg)
void BankView::refresh(void)
{
+ assert(osc);
//Odd case during initialization
if(!osc)
return;