Skip to content

Commit

Permalink
small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
wargio authored and XVilka committed Jan 7, 2024
1 parent 4f004a2 commit 33882a2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/core/Cutter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3188,13 +3188,13 @@ QList<ExportDescription> CutterCore::getAllExports()
QList<SymbolDescription> CutterCore::getAllSymbols()
{
CORE_LOCK();
QList<SymbolDescription> ret;

if (!(core && core->bin && core->bin->cur && core->bin->cur->o)) {
RzBinFile *bf = rz_bin_cur(core->bin);
if (!bf) {
return {};
}

const RzPVector *symbols = rz_bin_object_get_symbols(core->bin->cur->o);
QList<SymbolDescription> ret;
const RzPVector *symbols = rz_bin_object_get_symbols(bf->o);
if (symbols) {
for (const auto &bs : CutterPVector<RzBinSymbol>(symbols)) {
QString type = QString(bs->bind) + " " + QString(bs->type);
Expand All @@ -3207,7 +3207,7 @@ QList<SymbolDescription> CutterCore::getAllSymbols()
}
}

const RzList *entries = rz_bin_object_get_entries(core->bin->cur->o);
const RzList *entries = rz_bin_object_get_entries(bf->o);
if (entries) {
/* list entrypoints as symbols too */
int n = 0;
Expand Down

0 comments on commit 33882a2

Please sign in to comment.