diff --git a/src/widgets/DisassemblyWidget.cpp b/src/widgets/DisassemblyWidget.cpp index e53ebe76..06d951ee 100644 --- a/src/widgets/DisassemblyWidget.cpp +++ b/src/widgets/DisassemblyWidget.cpp @@ -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; diff --git a/src/widgets/GraphWidget.cpp b/src/widgets/GraphWidget.cpp index ea151610..9073bacf 100644 --- a/src/widgets/GraphWidget.cpp +++ b/src/widgets/GraphWidget.cpp @@ -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); diff --git a/src/widgets/HexdumpWidget.cpp b/src/widgets/HexdumpWidget.cpp index 35c3919d..95498b79 100644 --- a/src/widgets/HexdumpWidget.cpp +++ b/src/widgets/HexdumpWidget.cpp @@ -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"));