Skip to content

Commit

Permalink
Add null check for parent working set
Browse files Browse the repository at this point in the history
Could be triggeded by opening a list input dialog, disconnecting the
implement and clicking OK on the dialog
  • Loading branch information
martonmiklos committed Jan 11, 2025
1 parent 8b1c013 commit 9430daf
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/DataMaskRenderAreaComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,20 @@ void DataMaskRenderAreaComponent::mouseUp(const MouseEvent &event)
}
}
this->inputListModal->exitModalState();
parentWorkingSet->set_object_focus(isobus::NULL_OBJECT_ID);
if (nullptr != parentWorkingSet)
{
parentWorkingSet->set_object_focus(isobus::NULL_OBJECT_ID);
}
ownerServer.repaint_on_next_update();
ownerServer.process_macro(clickedList, isobus::EventID::OnInputFieldDeselection, isobus::VirtualTerminalObjectType::InputList, parentWorkingSet);
inputListModal.reset();
repaint();
};
inputListModal->enterModalState(true, ModalCallbackFunction::create(std::move(resultCallback)), false);
parentWorkingSet->set_object_focus(clickedObject->get_id());
if (nullptr != parentWorkingSet)
{
parentWorkingSet->set_object_focus(clickedObject->get_id());
}
ownerServer.process_macro(clickedObject, isobus::EventID::OnInputFieldSelection, isobus::VirtualTerminalObjectType::InputList, parentWorkingSet);
}
}
Expand Down

0 comments on commit 9430daf

Please sign in to comment.