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 |
- 1 comment
- 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
- Reply
- #1
Jim-Bim Feb 13, 2012 at 15:51 UTC - 0 likesJust added these checks, will be included in next update!