Skip to content

Commit

Permalink
Avoid a potential double copy
Browse files Browse the repository at this point in the history
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
  • Loading branch information
azeey committed Jan 29, 2025
1 parent d9bcffe commit 522e354
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/plugins/image_display/ImageDisplay.hh
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ namespace gz::gui::plugins
if (!this->img.isNull())
{
// Must return a copy
QImage copy(this->img);
return copy;
return this->img;
}

// Placeholder in case we have no image yet
Expand Down

0 comments on commit 522e354

Please sign in to comment.