summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2019-07-29 10:30:26 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2019-07-29 10:30:26 (GMT)
commitc131d65638effead8aa92a93fe16e1e61ce7180c (patch)
tree19f210ab379c78bc3ccc08557a7aee53385481dd /src
parent45f6396dfcc7e4f1916c5da3838f020ea842a5ca (diff)
downloadDoxygen-c131d65638effead8aa92a93fe16e1e61ce7180c.zip
Doxygen-c131d65638effead8aa92a93fe16e1e61ce7180c.tar.gz
Doxygen-c131d65638effead8aa92a93fe16e1e61ce7180c.tar.bz2
Non existing MSC file crashes doxygen
Diffstat (limited to 'src')
-rw-r--r--src/docparser.cpp25
-rw-r--r--src/docparser.h6
2 files changed, 23 insertions, 8 deletions
diff --git a/src/docparser.cpp b/src/docparser.cpp
index e94af01..be0d60b 100644
--- a/src/docparser.cpp
+++ b/src/docparser.cpp
@@ -2681,8 +2681,9 @@ DocDotFile::DocDotFile(DocNode *parent,const QCString &name,const QCString &cont
m_parent = parent;
}
-void DocDotFile::parse()
+bool DocDotFile::parse()
{
+ bool ok = false;
defaultHandleTitleAndSize(CMD_DOTFILE,this,m_children,m_width,m_height);
bool ambig;
@@ -2694,6 +2695,7 @@ void DocDotFile::parse()
if (fd)
{
m_file = fd->absFilePath();
+ ok = true;
}
else if (ambig)
{
@@ -2707,6 +2709,7 @@ void DocDotFile::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"included dot file %s is not found "
"in any of the paths specified via DOTFILE_DIRS!",qPrint(m_name));
}
+ return ok;
}
DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &context) :
@@ -2715,8 +2718,9 @@ DocMscFile::DocMscFile(DocNode *parent,const QCString &name,const QCString &cont
m_parent = parent;
}
-void DocMscFile::parse()
+bool DocMscFile::parse()
{
+ bool ok = false;
defaultHandleTitleAndSize(CMD_MSCFILE,this,m_children,m_width,m_height);
bool ambig;
@@ -2728,6 +2732,7 @@ void DocMscFile::parse()
if (fd)
{
m_file = fd->absFilePath();
+ ok = true;
}
else if (ambig)
{
@@ -2741,6 +2746,7 @@ void DocMscFile::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"included msc file %s is not found "
"in any of the paths specified via MSCFILE_DIRS!",qPrint(m_name));
}
+ return ok;
}
//---------------------------------------------------------------------------
@@ -2751,8 +2757,9 @@ DocDiaFile::DocDiaFile(DocNode *parent,const QCString &name,const QCString &cont
m_parent = parent;
}
-void DocDiaFile::parse()
+bool DocDiaFile::parse()
{
+ bool ok = false;
defaultHandleTitleAndSize(CMD_DIAFILE,this,m_children,m_width,m_height);
bool ambig;
@@ -2764,6 +2771,7 @@ void DocDiaFile::parse()
if (fd)
{
m_file = fd->absFilePath();
+ ok = true;
}
else if (ambig)
{
@@ -2777,6 +2785,7 @@ void DocDiaFile::parse()
warn_doc_error(g_fileName,doctokenizerYYlineno,"included dia file %s is not found "
"in any of the paths specified via DIAFILE_DIRS!",qPrint(m_name));
}
+ return ok;
}
//---------------------------------------------------------------------------
@@ -5029,8 +5038,14 @@ void DocPara::handleFile(const QCString &cmdName)
}
QCString name = g_token->name;
T *df = new T(this,name,g_context);
- m_children.append(df);
- df->parse();
+ if (df->parse())
+ {
+ m_children.append(df);
+ }
+ else
+ {
+ delete df;
+ }
}
void DocPara::handleVhdlFlow()
diff --git a/src/docparser.h b/src/docparser.h
index 2cc607e..cab1589 100644
--- a/src/docparser.h
+++ b/src/docparser.h
@@ -798,7 +798,7 @@ class DocDotFile : public CompAccept<DocDotFile>
{
public:
DocDotFile(DocNode *parent,const QCString &name,const QCString &context);
- void parse();
+ bool parse();
Kind kind() const { return Kind_DotFile; }
QCString name() const { return m_name; }
QCString file() const { return m_file; }
@@ -821,7 +821,7 @@ class DocMscFile : public CompAccept<DocMscFile>
{
public:
DocMscFile(DocNode *parent,const QCString &name,const QCString &context);
- void parse();
+ bool parse();
Kind kind() const { return Kind_MscFile; }
QCString name() const { return m_name; }
QCString file() const { return m_file; }
@@ -844,7 +844,7 @@ class DocDiaFile : public CompAccept<DocDiaFile>
{
public:
DocDiaFile(DocNode *parent,const QCString &name,const QCString &context);
- void parse();
+ bool parse();
Kind kind() const { return Kind_DiaFile; }
QCString name() const { return m_name; }
QCString file() const { return m_file; }