From f9377724769786469f321b6aaa0ce7564c354331 Mon Sep 17 00:00:00 2001 From: lalien Date: Wed, 7 Jun 2006 15:49:36 +0000 Subject: [PATCH] - bug fix: CTD when clicking on buttons git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@187 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- GameVersion.cpp | 2 +- JA2.vcproj | 4 ++-- Standard Gaming Platform/Button System.cpp | 6 ++---- Tactical/Weapons.cpp | 1 + 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/GameVersion.cpp b/GameVersion.cpp index 83e53c76..073429d7 100644 --- a/GameVersion.cpp +++ b/GameVersion.cpp @@ -23,7 +23,7 @@ INT16 zVersionLabel[256] = { L"Beta v. 0.98" }; #else //RELEASE BUILD VERSION - INT16 zVersionLabel[256] = { L"Release v1.13.181" }; + INT16 zVersionLabel[256] = { L"Release v1.13.187" }; #endif diff --git a/JA2.vcproj b/JA2.vcproj index c9633933..46502553 100644 --- a/JA2.vcproj +++ b/JA2.vcproj @@ -43,7 +43,7 @@ 3) + if((index < 0) || (index > 3)) return; - b->UserData[index]=userdata; + if(b != NULL) b->UserData[index]=userdata; } INT32 MSYS_GetBtnUserData(GUI_BUTTON *b,INT32 index) { - - if(index < 0 || index > 3) return(0); diff --git a/Tactical/Weapons.cpp b/Tactical/Weapons.cpp index ebadad04..ef921af3 100644 --- a/Tactical/Weapons.cpp +++ b/Tactical/Weapons.cpp @@ -5555,3 +5555,4 @@ INT8 GetAPsToReload( OBJECTTYPE *pObj ) ( 100 - GetPercentReloadTimeAPReduction(pObj) ) ) / 100; } +