Revision: 2387
          http://rigsofrods.svn.sourceforge.net/rigsofrods/?rev=2387&view=rev
Author:   ulteq
Date:     2012-01-30 03:28:34 +0000 (Mon, 30 Jan 2012)
Log Message:
-----------
[bugfixes] -Fix: Fixed crash when removeInstance is called.

Modified Paths:
--------------
    branches/bugfixes/source/main/physics/BeamFactory.cpp

Modified: branches/bugfixes/source/main/physics/BeamFactory.cpp
===================================================================
--- branches/bugfixes/source/main/physics/BeamFactory.cpp       2012-01-30 
03:17:48 UTC (rev 2386)
+++ branches/bugfixes/source/main/physics/BeamFactory.cpp       2012-01-30 
03:28:34 UTC (rev 2387)
@@ -562,7 +562,8 @@
 
        // synced delete
        trucks[b->trucknum] = 0;
-       delete b;
+       // TODO: properly delete trucks
+       //delete b;
        b = 0;
 
 #ifdef USE_MYGUI
@@ -696,11 +697,9 @@
 
 void BeamFactory::removeInstance(Beam *b)
 {
-       // TODO: properly delete trucks
+       if (b == 0) return;
        // hide the truck
-       if (b != 0)
-               b->deleteNetTruck();
-
+       b->deleteNetTruck();
        _deleteTruck(b);
 }
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Rigsofrods-devel mailing list
Rigsofrods-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rigsofrods-devel

Reply via email to