handle the case where qobject_cast<CollectionFetchJob *>(job) is 0
in case you didn't notice, I moved the Collection::List chain; declaration inside the conditional
handle the case where qobject_cast<CollectionFetchJob *>(job) is 0
in case you didn't notice, I moved the Collection::List chain; declaration inside the conditional
Lint Skipped |
Unit Tests Skipped |
_k_collectionReceived() is only ever connected to a CollectionFetchJob (in fetchCollection()) so I wonder how it can happen that the cast fails?
I generally don't see a problem with guarding against a null pointer or a bad cast, but in this case the bad pointer would just get forwarded to _collectionsNamesReceived() in the else branch, so you need to add protection there as well.
I wish I knew how the job could be bad. I can't reproduce.
I guess this doesn't cause any damage but I won't be hurt if you reject this patch. I had a core file so I made a patch