Fix nullpointer issue

This commit is contained in:
Juergen Spitzmueller 2019-07-21 13:14:20 +02:00
parent 76eb01718d
commit 85d5e9e747

View File

@ -466,7 +466,9 @@ Buffer::Impl::Impl(Buffer * owner, FileName const & file, bool readonly_,
if (!cloned_buffer_) {
temppath = createBufferTmpDir();
lyxvc.setBuffer(owner_);
Language const * inplang = languages.getFromCode(theApp()->inputLanguageCode());
Language const * inplang = theApp() ?
languages.getFromCode(theApp()->inputLanguageCode())
: nullptr;
if (inplang)
params.language = inplang;
if (use_gui)