diff --git a/tests/cefclient/osrplugin.cpp b/tests/cefclient/osrplugin.cpp index fc18e7f6b..8dc0a15cb 100644 --- a/tests/cefclient/osrplugin.cpp +++ b/tests/cefclient/osrplugin.cpp @@ -594,6 +594,9 @@ LRESULT CALLBACK PluginWndProc(HWND hWnd, UINT message, WPARAM wParam, case WM_DESTROY: // Stop the timer that's used for redrawing. KillTimer(hWnd, 1); + + // Explicitly close the offscreen browser and release the reference. + g_offscreenBrowser->CloseBrowser(); g_offscreenBrowser = NULL; return 0;