Mercurial > hg > orthanc-stone
diff Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp @ 1623:74be0f498b08
Updated mechanism to avoid using deleted objects in RequestAnimationFrame callbacks.
author | Benjamin Golinvaux <bgo@osimis.io> |
---|---|
date | Wed, 04 Nov 2020 11:39:15 +0100 |
parents | 0f8d6791b403 |
children | 78509230f0d7 |
line wrap: on
line diff
--- a/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Tue Nov 03 07:04:02 2020 +0100 +++ b/Applications/StoneWebViewer/WebAssembly/StoneWebViewer.cpp Wed Nov 04 11:39:15 2020 +0100 @@ -1793,7 +1793,7 @@ virtual ~ViewerViewport() { // Unregister the callbacks to avoid any call with a "void*" that - // has been destroyed. "WebAssemblyViewport::GetObjectCookie()" + // has been destroyed. "WebAssemblyViewport::CreateObjectCookie()" // provides a more advanced alternative. emscripten_set_wheel_callback(viewport_->GetCanvasCssSelector().c_str(), this, true, NULL); emscripten_set_keydown_callback(EMSCRIPTEN_EVENT_TARGET_WINDOW, this, false, NULL);