mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 09:55:40 +00:00
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()
|
w.mu.Unlock()
|
||||||
if anim {
|
if anim {
|
||||||
w.runOnMain(func(env *C.JNIEnv) {
|
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)
|
callVoidMethod(env, w.view, w.mpostFrameCallback)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user