summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
Diffstat (limited to 'python')
-rw-r--r--python/configuration.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/python/configuration.cc b/python/configuration.cc
index 93e92efa..b6a44b44 100644
--- a/python/configuration.cc
+++ b/python/configuration.cc
@@ -438,6 +438,10 @@ PyObject *ParseCommandLine(PyObject *Self,PyObject *Args)
return 0;
}
+ if (PySequence_Length(Pargv) < 1) {
+ PyErr_SetString(PyExc_ValueError,"argv is an empty sequence");
+ return 0;
+ }
// Convert the option list
int Length = PySequence_Length(POList);
CommandLine::Args *OList = new CommandLine::Args[Length+1];