Skip to content

Commit

Permalink
fix NRE when no weapon selected
Browse files Browse the repository at this point in the history
  • Loading branch information
BahamutoD committed Apr 23, 2016
1 parent bf2ff6a commit 0b67460
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
9 changes: 6 additions & 3 deletions BahaTurret/BahaTurret.userprefs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<MonoDevelop.Ide.Workspace ActiveConfiguration="Release|x86" />
<MonoDevelop.Ide.Workbench ActiveDocument="MissileFire.cs">
<Files>
<File FileName="MissileFire.cs" Line="3225" Column="22" />
<File FileName="ModuleWeapon.cs" Line="1" Column="1" />
<File FileName="MissileFire.cs" Line="1137" Column="7" />
<File FileName="ModuleWeapon.cs" Line="1145" Column="58" />
<File FileName="BDModulePilotAI.cs" Line="1" Column="1" />
<File FileName="RadarUtils.cs" Line="1" Column="1" />
<File FileName="ModuleTargetingCamera.cs" Line="1" Column="1" />
Expand All @@ -12,7 +12,7 @@
<File FileName="BDRotaryRail.cs" Line="1" Column="1" />
<File FileName="VesselRadarData.cs" Line="1" Column="1" />
<File FileName="TargetingCamera.cs" Line="1" Column="1" />
<File FileName="BDArmorySettings.cs" Line="1" Column="1" />
<File FileName="BDArmorySettings.cs" Line="683" Column="19" />
<File FileName="BDAPersistantSettingsField.cs" Line="1" Column="1" />
<File FileName="BDInputSettingsFields.cs" Line="1" Column="1" />
<File FileName="PooledBullet.cs" Line="1" Column="1" />
Expand All @@ -22,6 +22,9 @@
<File FileName="BDAShaderLoader.cs" Line="1" Column="1" />
<File FileName="TGPCameraEffects.cs" Line="1" Column="1" />
<File FileName="BDATargetManager.cs" Line="1" Column="1" />
<File FileName="RocketLauncher.cs" Line="315" Column="30" />
<File FileName="ExplosionFX.cs" Line="27" Column="7" />
<File FileName="BulletHitFX.cs" Line="63" Column="4" />
</Files>
</MonoDevelop.Ide.Workbench>
<MonoDevelop.Ide.DebuggingService.Breakpoints>
Expand Down
4 changes: 3 additions & 1 deletion BahaTurret/MissileFire.cs
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,9 @@ public override void OnUpdate()
}
}
}
else if((selectedWeapon.GetWeaponClass() == WeaponClasses.Gun && currentGun.roundsPerMinute < 1500))
else if(!guardMode &&
selectedWeapon != null &&
(selectedWeapon.GetWeaponClass() == WeaponClasses.Gun && currentGun.roundsPerMinute < 1500))
{
canRipple = true;
}
Expand Down
Binary file modified BahaTurret/bin/Release/BahaTurret.dll
Binary file not shown.
Binary file modified BahaTurret/obj/x86/Release/BahaTurret.dll
Binary file not shown.

0 comments on commit 0b67460

Please sign in to comment.