Grid2 crash due to invalid version check #566


  • Accepted
  • Fixed
Closed
  • Shirikii created this issue Jul 22, 2018

    Grid2 is completely crashing at startup with nothing usable. Resetting the Grid2 DB did nothing. I tracked it down to an issue in Grid2RaidDebuffs.lua:

     

    in Grid2:UpdateDefaults():

     

    	local version = Grid2:DbGetValue("versions", "Grid2RaidDebuffs")
    	if version >= 3 then return end
    	if not version then 
    		Grid2:DbSetMap( "icon-center", "raid-debuffs", 155)

    In my case, version is nil. This code is totally invalid because it only checks for nil after checking for nil >= 3 (which is illegal). The order of the checks needs to be fixed. After changing the code as follows, everything works fine:

     

    	local version = Grid2:DbGetValue("versions", "Grid2RaidDebuffs")
    	
    	if not version then 
    		Grid2:DbSetMap( "icon-center", "raid-debuffs", 155)
    	elseif version >= 3 then
    		return
    	else 

     

  • michaelsp closed issue Jul 22, 2018
  • michaelsp added the tags Accepted Fixed Jul 22, 2018

To post a comment, please login or register a new account.