Skip to content

Fix incorrect check for nullptr that triggers GCC 11 warning

Hugo Hromic requested to merge hhromic/fix-gcc11-warning into dev
  • This method seems to be unused, so anyway not affecting anything

Fixes this warning with GCC 11:

/solarus/src/core/Map.cpp: In member function ‘void Solarus::Map::build_foreground_surface()’:
/solarus/src/core/Map.cpp:605:45: warning: ‘this’ pointer is null [-Wnonnull]
  605 |   const Size& camera_size = camera->get_size();
      |                             ~~~~~~~~~~~~~~~~^~

Merge request reports