1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-24 22:14:36 +02:00
vcmi/lib/mapObjects
Vadim Markovtsev 92e011429f Fix crash on unknown map objects
If getHandlerFor() fails to find the handler, it returns a nullptr
shared pointer, which is later dereferenced unconditionally.

How to reproduce:
Download map "Happy time Dragons!!!" from http://heroesportal.net/maps.php?type=H3AB-XL&sort=r

=>

Failed to find object of type 5:144
SIGSEGV
2016-01-18 21:16:55 +03:00
..
CArmedInstance.cpp Bonus system: add treeHasChanged call where bonus objects changed 2015-12-11 16:13:18 +03:00
CArmedInstance.h VCMIDirs update #4 2014-08-11 20:17:17 +02:00
CBank.cpp Refactoring: use cleaner CCreatureSet::stacksCount everywhere 2015-12-24 21:30:57 +03:00
CBank.h VCMIDirs update #4 2014-08-11 20:17:17 +02:00
CGHeroInstance.cpp Refactoring: use cleaner CCreatureSet::stacksCount everywhere 2015-12-24 21:30:57 +03:00
CGHeroInstance.h Comments save format backward compatability code as Ivan suggested 2015-12-06 02:51:54 +03:00
CGMarket.cpp Removed all #include's of CMap.h from headers. 2015-12-02 21:05:10 +02:00
CGMarket.h Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
CGPandoraBox.cpp Refactoring: use cleaner CCreatureSet::stacksCount everywhere 2015-12-24 21:30:57 +03:00
CGPandoraBox.h CGEvent: avoid permanent event removal after visit. Fix issue 2339 2015-11-28 23:03:26 +03:00
CGTownInstance.cpp Bonus system: add treeHasChanged call where bonus objects changed 2015-12-11 16:13:18 +03:00
CGTownInstance.h reduced visibility for members of Mine and Dwellings 2015-12-02 22:34:13 +02:00
CObjectClassesHandler.cpp RMG will now multiply Monolith defs to ensure there are at least 100 pairs avaiable for connections. 2016-01-09 09:03:40 +01:00
CObjectClassesHandler.h Fixed sound on object pickup with dialog 2014-08-06 17:19:53 +02:00
CObjectHandler.cpp Fix crash on unknown map objects 2016-01-18 21:16:55 +03:00
CObjectHandler.h Move TTeleportExitsList to CObjectHandler.h 2015-12-05 01:14:03 +03:00
CommonConstructors.cpp CBankInfo: fix huge memory leak that appear in long run 2015-12-14 11:29:24 +03:00
CommonConstructors.h Compile fixes for MSVS 2015-12-23 15:23:56 +01:00
CQuest.cpp Removed all #include's of CMap.h from headers. 2015-12-02 21:05:10 +02:00
CQuest.h Add "override" to virtual overriden methods 2015-10-13 21:05:36 +03:00
CRewardableConstructor.cpp Something that compiles. 2014-06-26 22:05:27 +02:00
CRewardableConstructor.h Merge branch 'develop' of https://github.com/vcmi/vcmi into RMG 2014-06-26 20:12:37 +02:00
CRewardableObject.cpp CRewardableObject: fix onVisited message duplication for Idol of Fortune 2016-01-17 15:16:35 +03:00
CRewardableObject.h Fix CGBonusingObject serialization 2014-12-22 11:56:53 +03:00
JsonRandom.cpp Fix filenames in file headers 2015-12-08 09:53:14 +03:00
JsonRandom.h Something that compiles. 2014-06-26 22:05:27 +02:00
MapObjects.h Cleanup: 2014-06-05 20:26:50 +03:00
MiscObjects.cpp CGCreature: add reward granting. Fix issue 2372 2016-01-15 04:29:46 +03:00
MiscObjects.h CGCreature: add reward granting. Fix issue 2372 2016-01-15 04:29:46 +03:00
ObjectTemplate.cpp Fixed #2026 2015-03-12 10:08:10 +01:00
ObjectTemplate.h - Implemented object per zone limit 2014-07-15 22:33:51 +02:00