From the docs for QMap::operator
If the map contains no item with key "key", the function inserts a default-constructed value into the map with key key, and returns a reference to it.
A default constructed MyObject* will not point at a valid MyObject and attempting to use that pointer with fail.