From a900667ea1bb516ac562a6c45e4f3a1e4071b01b Mon Sep 17 00:00:00 2001 From: Jean-Marc Lasgouttes Date: Sun, 20 Feb 2022 17:09:49 +0100 Subject: [PATCH 1/1] Avoid null pointer dereference Spotted by coverity. --- src/graphics/GraphicsLoader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index b375c0ec38..dc3f7c5e35 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -400,7 +400,7 @@ void Loader::Impl::resetFile(FileName const & file) // new file. bool continue_monitoring = false; - if (!old_file.empty()) { + if (cached_item_ && !old_file.empty()) { continue_monitoring = cached_item_->monitoring(); // cached_item_ is going to be reset, so the connected // signal needs to be disconnected. -- 2.39.2