Fix a bug in Ghost causing crash on Blender exit.
authorBenoit Bolsee <benoit.bolsee@online.be>
Tue, 11 Aug 2009 11:44:45 +0000 (11:44 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Tue, 11 Aug 2009 11:44:45 +0000 (11:44 +0000)
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_System.h

index 87e5f375958511fa1f5596d52a8ffcd30a151db5..603452cfcbda512dd8befd77983d6705fc8b48d4 100644 (file)
@@ -289,8 +289,9 @@ GHOST_TSuccess GHOST_System::init()
 #endif
        
 #ifdef GHOST_DEBUG
+       m_eventPrinter = new GHOST_EventPrinter();
        if (m_eventManager) {
-               m_eventManager->addConsumer(&m_eventPrinter);
+               m_eventManager->addConsumer(m_eventPrinter);
        }
 #endif // GHOST_DEBUG
 
index 9310e9b259149e05a7727329c14fc916b2e01ed4..066fe4b93d31aa0ba22a45ca33eb60671bd93709 100644 (file)
@@ -335,7 +335,7 @@ protected:
 
        /** Prints all the events. */
 #ifdef GHOST_DEBUG
-       GHOST_EventPrinter m_eventPrinter;
+       GHOST_EventPrinter* m_eventPrinter;
 #endif // GHOST_DEBUG
 
        /** Settings of the display before the display went fullscreen. */