From 7f2aa891d1fe331e96c1937255d7069f8307f0a0 Mon Sep 17 00:00:00 2001 From: Alexander Bock Date: Thu, 6 Apr 2017 23:27:41 -0400 Subject: [PATCH] Do not crash if a non-existing kernel file is loaded through the Lua interface (closing #279) --- src/interaction/interactionhandler.cpp | 7 ++++++- src/scene/scene.cpp | 8 +++++++- src/util/spicemanager_lua.inl | 3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/interaction/interactionhandler.cpp b/src/interaction/interactionhandler.cpp index b76f4758e8..1ab20e2221 100644 --- a/src/interaction/interactionhandler.cpp +++ b/src/interaction/interactionhandler.cpp @@ -497,6 +497,11 @@ void InteractionHandler::writeKeyboardDocumentation(const std::string& type, } } + std::string generationTime; + try { + generationTime = Time::now().ISO8601(); + } + catch (...) {} std::stringstream html; html << "\n" @@ -511,7 +516,7 @@ void InteractionHandler::writeKeyboardDocumentation(const std::string& type, << "\t\n" << "\t