Added array existence check in weapons module. This might fix bug 166.

This commit is contained in:
Richard Helgeby 2010-08-06 14:49:38 +02:00
parent 3f68eaa2f0
commit 5d7cdd5aa5

View File

@ -482,6 +482,12 @@ stock WeaponsNameToIndex(const String:weapon[])
*/
stock WeaponsEntityToDisplay(const String:entityname[], String:display[], displaymaxlen, noprefix = false)
{
// Check if weapon data is loaded.
if (arrayWeapons == INVALID_HANDLE)
{
return -1;
}
decl String:weaponentity[WEAPONS_MAX_LENGTH];
// Initialize string to null.