diff --git a/gfx/thebes/gfxPlatform.cpp b/gfx/thebes/gfxPlatform.cpp index a1d52a4f7137..8c4b4de6cb91 100644 --- a/gfx/thebes/gfxPlatform.cpp +++ b/gfx/thebes/gfxPlatform.cpp @@ -1008,6 +1008,10 @@ gfxPlatform::Shutdown() gfx::Factory::ShutDown(); + if (gfxConfig::IsEnabled(Feature::WEBRENDER)) { + mozilla::wr::wr_shutdown_external_log_handler(); + } + delete gGfxPlatformPrefsLock; gfxVars::Shutdown(); @@ -1016,8 +1020,6 @@ gfxPlatform::Shutdown() gfxConfig::Shutdown(); - mozilla::wr::wr_shutdown_external_log_handler(); - gPlatform->WillShutdown(); delete gPlatform;