提交 e6ad96e3 编写于 作者: A Adam Barth

Don't crash when removing a radio button

We were hitting an assert in RenderCustomPaint that the callback wasn't null.

R=eseidel@chromium.org, jackson@chromium.org

Review URL: https://codereview.chromium.org/1162023010
上级 12aa568f
......@@ -680,14 +680,20 @@ class RenderCustomPaint extends RenderProxyBox {
CustomPaintCallback _callback;
void set callback (CustomPaintCallback value) {
assert(value != null);
assert(value != null || !attached);
if (_callback == value)
return;
_callback = value;
markNeedsPaint();
}
void attach() {
assert(_callback != null);
super.attach();
}
void paint(RenderObjectDisplayList canvas) {
assert(_callback != null);
_callback(canvas);
super.paint(canvas);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册