Skip to content

Commit

Permalink
Fix #1834: segfault on addMaximizeButton
Browse files Browse the repository at this point in the history
... for image/camera displays if no window manager is instantiated
  • Loading branch information
rhaschke committed May 28, 2024
1 parent ba95c1f commit fdcf656
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/rviz/default_plugin/camera_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,8 @@ void CameraDisplay::onInitialize()
render_panel_->initialize(context_->getSceneManager(), context_);

setAssociatedWidget(render_panel_);
getAssociatedWidgetPanel()->addMaximizeButton();
if (auto* dock = getAssociatedWidgetPanel())
dock->addMaximizeButton();

render_panel_->setAutoRender(false);
render_panel_->setOverlaysEnabled(false);
Expand Down
3 changes: 2 additions & 1 deletion src/rviz/default_plugin/image_display.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ void ImageDisplay::onInitialize()
render_panel_->initialize(img_scene_manager_, context_);

setAssociatedWidget(render_panel_);
getAssociatedWidgetPanel()->addMaximizeButton();
if (auto* dock = getAssociatedWidgetPanel())
dock->addMaximizeButton();

render_panel_->setAutoRender(false);
render_panel_->setOverlaysEnabled(false);
Expand Down

0 comments on commit fdcf656

Please sign in to comment.