[LyX/master] fix potential null pointer (reported by coverity)

Juergen Spitzmueller spitz at lyx.org
Sat Sep 7 10:37:01 UTC 2024


commit 35b832f344daae1b33cfad168538997834b644a2
Author: Juergen Spitzmueller <spitz at lyx.org>
Date:   Sat Sep 7 12:36:23 2024 +0200

    fix potential null pointer (reported by coverity)
---
 src/frontends/qt/GuiLog.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/frontends/qt/GuiLog.cpp b/src/frontends/qt/GuiLog.cpp
index 8e6b9cd544..f434d73b90 100644
--- a/src/frontends/qt/GuiLog.cpp
+++ b/src/frontends/qt/GuiLog.cpp
@@ -278,6 +278,8 @@ bool GuiLog::initialiseParams(string const & sdata)
 						continue;
 				}
 				Index const * index = indiceslist.findShortcut(ci);
+				if (!index)
+					continue;
 				string const name = to_utf8(index->index());
 				logTypeCO->addItem(qt_(name), toqstr("index:" + stmp.absFileName()));
 			}


More information about the lyx-cvs mailing list