Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Gracefully handle zero-requirement modules
  • Loading branch information
djphoenix committed May 26, 2019
1 parent 6a6e5f7 commit 39182ab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/process/modules.cpp
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 39182ab

Please sign in to comment.