Unverified Commit 39182abd authored by PhoeniX's avatar PhoeniX

Gracefully handle zero-requirement modules

parent 6a6e5f75
......@@ -104,6 +104,7 @@ bool ModuleManager::bindRequirement(const char *req, Process *process) {
}
bool ModuleManager::bindRequirements(const char *reqs, Process *process) {
if (reqs == nullptr) return 1;
const char *re;
char *r;
while (*reqs != 0) {
......@@ -150,8 +151,7 @@ void ModuleManager::loadStream(Stream *stream) {
sub->seek(ptrdiff_t(size), -1);
if (!stream->eof()) {
Stream *_sub = sub->substream();
if (sub != stream)
delete sub;
if (sub != stream) delete sub;
sub = _sub;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment