From 9406eb0ff92829df03a3b899467e332f1a7323a8 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Wed, 9 Jul 2008 09:48:59 +0000 Subject: [PATCH] Fix crash reported in http://bugzilla.lyx.org/show_bug.cgi?id=4873 I don't think the crash is related to that bug. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@25514 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/graphics/GraphicsLoader.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/graphics/GraphicsLoader.cpp b/src/graphics/GraphicsLoader.cpp index 9efdb5f80e..8b8fd9ce15 100644 --- a/src/graphics/GraphicsLoader.cpp +++ b/src/graphics/GraphicsLoader.cpp @@ -407,7 +407,12 @@ void Loader::Impl::statusChanged() void Loader::Impl::createPixmap() { - if (!cached_item_.get() || !params_.display || status_ != Loaded) + if (!cached_item_.get()) { + LYXERR(Debug::GRAPHICS, "pixmap not cached yet"); + return; + } + + if (!params_.display || status_ != Loaded) return; image_.reset(cached_item_->image()->clone());