diff options
Diffstat (limited to 'emulator/opengl')
| -rw-r--r-- | emulator/opengl/host/libs/libOpenglRender/RenderServer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/emulator/opengl/host/libs/libOpenglRender/RenderServer.cpp b/emulator/opengl/host/libs/libOpenglRender/RenderServer.cpp index c726e00b7..0acb30735 100644 --- a/emulator/opengl/host/libs/libOpenglRender/RenderServer.cpp +++ b/emulator/opengl/host/libs/libOpenglRender/RenderServer.cpp @@ -106,12 +106,11 @@ int RenderServer::Main() if (!rt) { fprintf(stderr,"Failed to create RenderThread\n"); delete stream; - } - - if (!rt->start()) { + stream = NULL; + } else if (!rt->start()) { fprintf(stderr,"Failed to start RenderThread\n"); - delete stream; delete rt; + rt = NULL; } // @@ -133,10 +132,11 @@ int RenderServer::Main() } } - // insert the added thread to the list - threads.insert(rt); - - DBG("Started new RenderThread\n"); + // if the thread has been created and started, insert it to the list + if (rt) { + threads.insert(rt); + DBG("Started new RenderThread\n"); + } } // |
