From 129e00aa24e1548f4732b8abc5c5ee6490bd2f0a Mon Sep 17 00:00:00 2001 From: Enrico Forestieri Date: Thu, 12 May 2011 23:08:50 +0000 Subject: [PATCH] Fix bug #7553 (Crash on latex import, also on html import) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@38734 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Converter.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Converter.cpp b/src/Converter.cpp index 8adcfc3258..1e3b15c380 100644 --- a/src/Converter.cpp +++ b/src/Converter.cpp @@ -307,7 +307,8 @@ bool Converters::convert(Buffer const * buffer, LYXERR(Debug::FILES, "No converter defined! " "I use convertDefault.py:\n\t" << command); Systemcall one; - one.startscript(Systemcall::Wait, command, buffer->filePath()); + one.startscript(Systemcall::Wait, command, buffer ? + buffer->filePath() : string()); if (to_file.isReadableFile()) { if (conversionflags & try_cache) ConverterCache::get().add(orig_from, @@ -444,13 +445,14 @@ bool Converters::convert(Buffer const * buffer, if (dummy) { res = one.startscript(Systemcall::DontWait, to_filesystem8bit(from_utf8(command)), - buffer->filePath()); + buffer ? buffer->filePath() : string()); // We're not waiting for the result, so we can't do anything // else here. } else { res = one.startscript(Systemcall::Wait, to_filesystem8bit(from_utf8(command)), - buffer->filePath()); + buffer ? buffer->filePath() + : string()); if (!real_outfile.empty()) { Mover const & mover = getMover(conv.to); if (!mover.rename(outfile, real_outfile)) -- 2.39.5