diff libgui/src/documentation.cc @ 26408:25dfa8c96b7b stable

* documentation.cc (notice_settings): prevent segfault if help engine does not exist
author Torsten <mttl@mailbox.org>
date Thu, 03 Jan 2019 22:21:55 +0100
parents 00f796120a6d
children 6e0bf8212b40
line wrap: on
line diff
--- a/libgui/src/documentation.cc	Thu Jan 03 10:50:11 2019 -0800
+++ b/libgui/src/documentation.cc	Thu Jan 03 22:21:55 2019 +0100
@@ -538,6 +538,11 @@
 
   void documentation::notice_settings (const QSettings *settings)
   {
+    // If m_help_engine is not defined, the object accessed by this method
+    // are not valid. Thus, just return in this case
+    if (! m_help_engine)
+      return;
+
     // Icon size in the toolbar.
     int size_idx = settings->value (global_icon_size.key,
                                     global_icon_size.def).toInt ();