Fix crash on theme edition (#1614)

This commit is contained in:
optizone 2019-06-20 17:28:35 +03:00 committed by xarkes
parent d8e438411a
commit 594896c06f
3 changed files with 9 additions and 3 deletions

View File

@ -40,7 +40,9 @@ DisassemblyWidget::DisassemblyWidget(MainWindow *main, QAction *action)
, mDisasScrollArea(new DisassemblyScrollArea(this))
, mDisasTextEdit(new DisassemblyTextEdit(this))
{
setObjectName(main->getUniqueObjectName(getWidgetType()));
setObjectName(main
? main->getUniqueObjectName(getWidgetType())
: getWidgetType());
topOffset = bottomOffset = RVA_INVALID;
cursorLineOffset = 0;

View File

@ -6,7 +6,9 @@
GraphWidget::GraphWidget(MainWindow *main, QAction *action) :
MemoryDockWidget(CutterCore::MemoryWidgetType::Graph, main, action)
{
setObjectName(main->getUniqueObjectName(getWidgetType()));
setObjectName(main
? main->getUniqueObjectName(getWidgetType())
: getWidgetType());
setAllowedAreas(Qt::AllDockWidgetAreas);
graphView = new DisassemblerGraphView(this, seekable);

View File

@ -22,7 +22,9 @@ HexdumpWidget::HexdumpWidget(MainWindow *main, QAction *action) :
{
ui->setupUi(this);
setObjectName(main->getUniqueObjectName(getWidgetType()));
setObjectName(main
? main->getUniqueObjectName(getWidgetType())
: getWidgetType());
ui->copyMD5->setIcon(QIcon(":/img/icons/copy.svg"));
ui->copySHA1->setIcon(QIcon(":/img/icons/copy.svg"));