Fixed segmentation fault when there was no board loaded.

This commit is contained in:
Maciej Suminski 2013-07-05 15:48:45 +02:00
parent eb041ee2d3
commit b5aadfc3f9
1 changed files with 3 additions and 3 deletions

View File

@ -114,6 +114,9 @@ OPENGL_GAL::OPENGL_GAL( wxWindow* aParent, wxEvtHandler* aMouseListener,
// Compute unit semicircle & circle vertices and store them in a buffer for faster drawing
computeCircleVbo();
// By default we draw non-cached objects, it changes on BeginGroup()/EndGroup()
currentContainer = &nonCachedVbo;
}
@ -437,9 +440,6 @@ void OPENGL_GAL::BeginDrawing()
// Prepare buffer for non-cached items
delete nonCachedItem;
nonCachedItem = new VBO_ITEM( &nonCachedVbo );
// By default we draw non-cached objects, it changes on BeginGroup()/EndGroup()
currentContainer = &nonCachedVbo;
currentItem = nonCachedItem;
}