GetComponent on Collider not working

I’m working on a way to allow the player to kill monsters/destroy barricades. I have it mostly complete but for some reason, this one script isn’t working how it should.

void OnCollisionEnter (  Collision c   ){
	if (weaponType == WeaponType.Missile) {
		if (c.gameObject.GetComponent<Damageable>() != null) {
			Damageable damageable = c.gameObject.GetComponent<Damageable>();
			damageable.ApplyDamage( damage );

I have a gameObject with the Damageable script attached and I know the collision script runs because the bolt destroys itself (the second line runs perfectly) on collision but the Debug.Log function isn’t run.

If someone could tell me why the second If statement doesn’t run and how I would make it work, I would greatly appreciate it.

right before your " if (c.gameObject.GetComponent() != null) " line, put this statement:

Debug.Log (c.gameObject);

what does it output as?

I’m hitting this same issue. Inside the IF statement the GetComponent method seems to return null. If I call GetComponent before the IF statement and compare against that then it works.