]> git.siccegge.de Git - frida/frida.git/commitdiff
Fix startup if no binary is specified on the commandline
authorChristoph Egger <siccegge@faui1-107.informatik.uni-erlangen.de>
Tue, 20 Jan 2015 15:34:37 +0000 (16:34 +0100)
committerChristoph Egger <siccegge@faui1-107.informatik.uni-erlangen.de>
Tue, 20 Jan 2015 15:34:37 +0000 (16:34 +0100)
src/core/InformationManager.cxx
src/disassembler/llvm/LLVMDisassembler.cxx

index 8f916ef6d2f5e24d3bf62778e39976aeeee70b3f..f0b6e1e444c78491a0c33018fabb6c5a54c47b5b 100644 (file)
@@ -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();
 }
index 9ab28440f7f96451ef8fb5cc0e4e4b1c604ab613..cf40aaa7ec882fbcd76d09645ca88740a8071231 100644 (file)
@@ -13,6 +13,9 @@ using std::error_code;
  *
  */
 Disassembler * createLLVMDisassembler(const std::string& filename, InformationManager* manager) {
+       if (filename == "")
+               return NULL;
+
        std::unique_ptr<Binary> o;
        o.reset(createBinary(filename).get());
        const Binary * op = o.get();