comparison Main.lua @ 282:69ed3a28c7e6 5.2.0-8

Fix for possibility of C_BlackMarket.GetNumItems() returning nil.
author James D. Callahan III <jcallahan@curse.com>
date Fri, 03 May 2013 11:09:32 -0500
parents 495108578530
children 40c8f8e32c65
comparison
equal deleted inserted replaced
281:495108578530 282:69ed3a28c7e6
1029 1029
1030 function WDP:BLACK_MARKET_ITEM_UPDATE(event_name) 1030 function WDP:BLACK_MARKET_ITEM_UPDATE(event_name)
1031 if not ALLOWED_LOCALES[CLIENT_LOCALE] then 1031 if not ALLOWED_LOCALES[CLIENT_LOCALE] then
1032 return 1032 return
1033 end 1033 end
1034 local num_items = _G.C_BlackMarket.GetNumItems() 1034 local num_items = _G.C_BlackMarket.GetNumItems() or 0
1035 1035
1036 for index = 1, num_items do 1036 for index = 1, num_items do
1037 local name, texture, quantity, item_type, is_usable, level, level_type, seller_name, min_bid, min_increment, current_bid, has_high_bid, num_bids, time_left, item_link, market_id = _G.C_BlackMarket.GetItemInfoByIndex(index); 1037 local name, texture, quantity, item_type, is_usable, level, level_type, seller_name, min_bid, min_increment, current_bid, has_high_bid, num_bids, time_left, item_link, market_id = _G.C_BlackMarket.GetItemInfoByIndex(index);
1038 1038
1039 if item_link then 1039 if item_link then