From 806bd6346fe7b9381d3b4b757f935b3810a927db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sat, 14 Jul 2018 21:04:13 +0200 Subject: [PATCH] Set r2 prefix before r_core_loadlibs() --- src/Cutter.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/Cutter.cpp b/src/Cutter.cpp index 8c201556..ea5e0102 100644 --- a/src/Cutter.cpp +++ b/src/Cutter.cpp @@ -51,11 +51,6 @@ CutterCore::CutterCore(QObject *parent) : { r_cons_new(); // initialize console this->core_ = r_core_new(); - r_core_loadlibs(this->core_, R_CORE_LOADLIBS_ALL, NULL); - // IMPLICIT r_bin_iobind (core_->bin, core_->io); - - // Otherwise r2 may ask the user for input and Cutter would freeze - setConfig("scr.interactive", false); #if defined(APPIMAGE) || defined(MACOS_R2_BUNDLED) auto prefix = QDir(QCoreApplication::applicationDirPath()); @@ -73,6 +68,12 @@ CutterCore::CutterCore(QObject *parent) : setConfig("dir.prefix", prefix.absolutePath()); #endif + r_core_loadlibs(this->core_, R_CORE_LOADLIBS_ALL, NULL); + // IMPLICIT r_bin_iobind (core_->bin, core_->io); + + // Otherwise r2 may ask the user for input and Cutter would freeze + setConfig("scr.interactive", false); + asyncTaskManager = new AsyncTaskManager(this); }