mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 13:06:59 -04:00
fixed: errors in templates could cause program to hang/crash
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@796 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -21,7 +21,7 @@ IMPLEMENT_VALUE_VIEWER(Image);
|
||||
|
||||
void ImageValueViewer::draw(RotatedDC& dc) {
|
||||
// reset?
|
||||
int w = (int)dc.trX(style().width), h = (int)dc.trY(style().height);
|
||||
int w = max(0,(int)dc.trX(style().width)), h = max(0,(int)dc.trY(style().height));
|
||||
int a = dc.trAngle(0); //% TODO : Add getAngle()?
|
||||
if (bitmap.Ok() && (a != angle || size.width != w || size.height != h)) {
|
||||
bitmap = Bitmap();
|
||||
|
||||
Reference in New Issue
Block a user