From: Christoph Egger Date: Tue, 20 Jan 2015 15:34:37 +0000 (+0100) Subject: Fix startup if no binary is specified on the commandline X-Git-Tag: v0.1~126 X-Git-Url: https://git.siccegge.de//index.cgi?a=commitdiff_plain;h=72a9a502691a01578c06165bfe79097daafa2b05;p=frida%2Ffrida.git Fix startup if no binary is specified on the commandline --- diff --git a/src/core/InformationManager.cxx b/src/core/InformationManager.cxx index 8f916ef..f0b6e1e 100644 --- a/src/core/InformationManager.cxx +++ b/src/core/InformationManager.cxx @@ -3,5 +3,6 @@ void InformationManager::reset(const std::string& filename) { disassembler.reset(createLLVMDisassembler(filename, this)); - disassembler.get()->start(); + if (disassembler.get() != NULL) + disassembler.get()->start(); } diff --git a/src/disassembler/llvm/LLVMDisassembler.cxx b/src/disassembler/llvm/LLVMDisassembler.cxx index 9ab2844..cf40aaa 100644 --- a/src/disassembler/llvm/LLVMDisassembler.cxx +++ b/src/disassembler/llvm/LLVMDisassembler.cxx @@ -13,6 +13,9 @@ using std::error_code; * */ Disassembler * createLLVMDisassembler(const std::string& filename, InformationManager* manager) { + if (filename == "") + return NULL; + std::unique_ptr o; o.reset(createBinary(filename).get()); const Binary * op = o.get();