mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 13:17:00 -04:00
Don't show message boxes for assertion failures, since this can lead to crashes when in OnPaint
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1197 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -72,7 +72,9 @@ void CardViewer::onChangeSize() {
|
||||
void CardViewer::onPaint(wxPaintEvent&) {
|
||||
#ifdef _DEBUG
|
||||
// we don't want recursion
|
||||
assert(!inOnPaint());
|
||||
if (inOnPaint()) {
|
||||
wxTrap();
|
||||
}
|
||||
WITH_DYNAMIC_ARG(inOnPaint, true);
|
||||
#endif
|
||||
wxSize cs = GetClientSize();
|
||||
@@ -129,7 +131,9 @@ class CardViewer::OverdrawDC : private OverdrawDC_aux, public RotatedDC {
|
||||
shared_ptr<RotatedDC> CardViewer::overdrawDC() {
|
||||
#ifdef _DEBUG
|
||||
// don't call from onPaint
|
||||
assert(!inOnPaint());
|
||||
if (inOnPaint()) {
|
||||
wxTrap();
|
||||
}
|
||||
#endif
|
||||
return shared_ptr<RotatedDC>(new OverdrawDC(this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user