Skip to content

Commit

Permalink
Merge pull request ddnet#9499 from edg-l/fix_segfault_game_layers_tele
Browse files Browse the repository at this point in the history
Fix segfault when using Game Tiles on a group that is not the game group
  • Loading branch information
def- authored Jan 9, 2025
2 parents 0ad732f + 35d687e commit c860bb7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/game/editor/mapitems/layer_tiles.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,8 @@ void CLayerTiles::FillGameTiles(EGameTileOp Fill)
m_pEditor->m_Map.MakeTeleLayer(pLayer);
m_pEditor->m_Map.m_pGameGroup->AddLayer(pLayer);

vpActions.push_back(std::make_shared<CEditorActionAddLayer>(m_pEditor, m_pEditor->m_SelectedGroup, m_pEditor->m_Map.m_pGameGroup->m_vpLayers.size() - 1));
vpActions.push_back(std::make_shared<CEditorActionAddLayer>(m_pEditor, LAYERTYPE_GAME,
m_pEditor->m_Map.m_pGameGroup->m_vpLayers.size() - 1));

if(m_Width != pGLayer->m_Width || m_Height > pGLayer->m_Height)
{
Expand Down

0 comments on commit c860bb7

Please sign in to comment.