mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
Avoid null pointer dereference
Spotted by coverity.
This commit is contained in:
parent
e263fe8e03
commit
a900667ea1
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user