1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-25 04:43:33 +00:00

fix coredump

Submitted by:	Igor Russkih <cail@nm.ru>
This commit is contained in:
Ying-Chieh Liao 2004-03-26 04:06:22 +00:00
parent d58c93590e
commit 187b3c8497
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=105295

View File

@ -0,0 +1,15 @@
--- src/shared/colorer/parsers/HRCParserImpl.cpp.orig Fri Mar 26 11:36:50 2004
+++ src/shared/colorer/parsers/HRCParserImpl.cpp Fri Mar 26 11:38:05 2004
@@ -366,6 +366,12 @@
if (*tmpel->getName() == "inherit"){
const String *nqSchemeName = tmpel->getParamValue(DString("scheme"));
+
+ if (nqSchemeName == null || nqSchemeName->length() == 0){
+ if (errorHandler != null) errorHandler->error(StringBuffer("empty scheme name in inheritance operator in scheme '")+scheme->schemeName+"'");
+ continue;
+ };
+
next->type = SNT_INHERIT;
next->schemeName = new SString(nqSchemeName);
String *schemeName = qualifyForeignName(nqSchemeName, QNT_SCHEME, false);