Set r2 prefix before r_core_loadlibs()

This commit is contained in:
Florian Märkl 2018-07-14 21:04:13 +02:00
parent 000d0ce7e7
commit 806bd6346f

View File

@ -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);
}