MonkeyQuest

17 - Some simple 'nil' error checking in MonkeyQuestButton_OnEnter

What does the provided patch do? Add some error-checking for 'nil' error to MonkeyQuestButton_OnEnter function.

Please provide any additional information below. After first if statement of MonkeyQuestButton_OnEnter function in MonkeyQuest.lua, at line 1445, add the following:

	if (self == nil) then	return;	end
	if (self.m_iQuestIndex == nil) then	return;	end

Doing this will keep the error from being reported. I added this to my copy after getting the error "Interface\AddOns\MonkeyQuest\MonkeyQuest.lua:1445: attempt to index local 'self' (a nil value)" which, I think, was actually caused by qComments (adding this made the offending line in qComments be reported instead).

User When Change
Jim-Bim Feb 13, 2012 at 15:51 UTC Changed status from Accepted to Fixed
Jim-Bim Dec 14, 2010 at 18:05 UTC Changed status from New to Accepted
CaptWhyNot Nov 25, 2010 at 01:10 UTC Create

You must login to post a comment. Don't have an account? Register to get one!

  • 1 comment
  • Avatar of Jim-Bim Jim-Bim Feb 13, 2012 at 15:51 UTC - 0 likes

    Just added these checks, will be included in next update!

  • 1 comment

Facts

Last updated
Feb 13, 2012
Reported
Nov 25, 2010
Status
Fixed - Developer made requested changes. QA should verify.
Type
Patch - Source code patch for review
Priority
Medium - Normal priority.
Votes
0

Reported by

Possible assignees