Commit 857de75c authored by Jussi Lindgren's avatar Jussi Lindgren

Applications: Added gtk_init success check to AS and Designer

parent c2251c4e
......@@ -171,7 +171,19 @@ int main(int argc, char ** argv)
g_thread_init(NULL);
#endif
gdk_threads_init();
gtk_init(&argc, &argv);
if(!gtk_init_check(&argc, &argv))
{
l_pKernelContext->getLogManager() << LogLevel_Error << "Unable to initialize GTK. Possibly the display could not be opened. Exiting.\n";
OpenViBEToolkit::uninitialize(*l_pKernelContext);
l_pKernelDesc->releaseKernel(l_pKernelContext);
l_oKernelLoader.uninitialize();
l_oKernelLoader.unload();
return -2;
}
// gtk_rc_parse(OpenViBE::Directories::getDataDir() + "/applications/designer/interface.gtkrc");
......
......@@ -569,7 +569,18 @@ int go(int argc, char ** argv)
setlocale( LC_ALL, l_sLocale.toASCIIString() );
//initialise Gtk before 3D context
gtk_init(&argc, &argv);
if(!gtk_init_check(&argc, &argv))
{
l_rLogManager << LogLevel_Error << "Unable to initialize GTK. Possibly the display could not be opened. Exiting.\n";
OpenViBEToolkit::uninitialize(*l_pKernelContext);
l_pKernelDesc->releaseKernel(l_pKernelContext);
l_oKernelLoader.uninitialize();
l_oKernelLoader.unload();
return -2;
}
// gtk_rc_parse(OpenViBE::Directories::getDataDir() + "/applications/designer/interface.gtkrc");
#ifdef TARGET_OS_Linux
......
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