Skip to content

Commit

Permalink
Add pointer check in Application::RemovePlugin (#501)
Browse files Browse the repository at this point in the history
Signed-off-by: Nate Koenig <nate@openrobotics.org>
  • Loading branch information
nkoenig authored Nov 11, 2022
1 parent b09d084 commit 721eca0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Application.cc
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ bool Application::RemovePlugin(const std::string &_pluginName)
// Remove split on QML
auto bgItem = this->dataPtr->mainWin->QuickWindow()
->findChild<QQuickItem *>("background");
if (bgItem)
if (bgItem && cardItem->parentItem())
{
QMetaObject::invokeMethod(bgItem, "removeSplitItem",
Q_ARG(QVariant, cardItem->parentItem()->objectName()));
Expand Down

0 comments on commit 721eca0

Please sign in to comment.