forked from joejulian/gio
app/internal/window: [Android] skip redraw for destroyed views
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -369,6 +369,10 @@ func (w *window) SetAnimating(anim bool) {
|
||||
w.mu.Unlock()
|
||||
if anim {
|
||||
w.runOnMain(func(env *C.JNIEnv) {
|
||||
if w.view == 0 {
|
||||
// View was destroyed while switching to main thread.
|
||||
return
|
||||
}
|
||||
callVoidMethod(env, w.view, w.mpostFrameCallback)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user