diff --git a/rktwebview.cpp b/rktwebview.cpp index f16000f..2073aa0 100644 --- a/rktwebview.cpp +++ b/rktwebview.cpp @@ -242,8 +242,8 @@ void rkt_evt_guard(void) INFO2("Got event wv = %d, %s\n", wv, data.c_str()); } if (wv != EVT_GUARD_STOP) { + handler->evt_queue->enqueue(wv, data); if (handler->evt_cb != nullptr) { // evt_cb could be cleared to null - handler->evt_queue->enqueue(wv, data); INFO2("Calling evt_cb with %d, %s\n", wv, data.c_str()); handler->evt_cb(1); INFO0("done\n"); @@ -300,6 +300,7 @@ void rkt_webview_cleanup() // QtWebEngine cannot be started as part of QApplication more than once in an application run. // So we would need to cleanup at exit of racket/drracket. // Cleaning up when exiting the current custodian is not enough. + INFO0("rkt_webview_cleanup - cleaning up\n"); handler->verbose = true; @@ -360,6 +361,8 @@ void rkt_webview_cleanup() // Cleanup Handler delete handler; handler = nullptr; + } else { + WARN0("rkt_webview_cleanup called, but handler == null\n"); } }