Commit b5aadfc3 authored by Maciej Suminski's avatar Maciej Suminski

Fixed segmentation fault when there was no board loaded.

parent eb041ee2
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment