Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9297


Ignore:
Timestamp:
Jun 14, 2012, 11:10:06 PM (12 years ago)
Author:
landauf
Message:
  • fixed crash on closing pickup inventory. happened if pickup inventory and detail window were closed with ESC which didn't clean up the detail window properly. the next time the pickup inventory was opened and closed, the game crashed.
  • cleaned up a detail in PickupCollectionIdentifier
Location:
code/branches/presentation2012merge
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/presentation2012merge/data/gui/scripts/PickupInventory.lua

    r7504 r9297  
    176176    for k,v in pairs(P.detailsWindows) do
    177177        if v ~= nil then
    178             winMgr:destroyWindow(v)
     178            P.destroyDetailWindow(k)
    179179        end
    180180    end
     
    323323    local detailNr = tonumber(match())
    324324   
     325    P.destroyDetailWindow(detailNr)
     326end
     327
     328function P.destroyDetailWindow(detailNr)
    325329    local window = P.detailsWindows[detailNr]
    326330    winMgr:destroyWindow(window)
  • code/branches/presentation2012merge/src/modules/pickup/PickupCollectionIdentifier.cc

    r9290 r9297  
    7272        assert(identifier);
    7373
    74         // Slight un-niceity to cast the const PickupIdentifier to a const PickupCollectionIdentifier, but since we cast to a const, there is no harm done.
    75         PickupIdentifier* temp = const_cast<PickupIdentifier*>(identifier);
    76         const PickupCollectionIdentifier* collectionIdentifier = orxonox_cast<PickupCollectionIdentifier*>(temp);
     74        const PickupCollectionIdentifier* collectionIdentifier = orxonox_cast<const PickupCollectionIdentifier*>(identifier);
    7775
    7876        // If the input PickupIdentifier 'identifier' is no PickupCollectionIdentifier then just the two PickupIdentifiers are compared.
Note: See TracChangeset for help on using the changeset viewer.