View Single Post
11-12-12, 02:50 AM   #6
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,326
Originally Posted by Phanx View Post
Code:
		local val = EnumerateFrames()
		while val do
			if register(val) then
				val = EnumerateFrames(val)
			end
		end
If register(val) ever returns false or nil, this will send the game into an infinite loop.



Try this with Phanx's other modification to register():
Code:
	local val = EnumerateFrames()
	while val and register(val) do
		val = EnumerateFrames(val)
	end
The only problem with this is when it runs into the error, it'll stop hooking. There isn't any other way around this.
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 11-12-12 at 03:09 AM.
  Reply With Quote