Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-1.1
Commits
bad5a049
Commit
bad5a049
authored
Feb 20, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: fail cleanly if started multiple times (instead of crashing)
parent
96966aea
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+9
-0
No files found.
modules/gui/qt4/qt4.cpp
View file @
bad5a049
...
...
@@ -271,6 +271,7 @@ static vlc_sem_t ready;
#ifdef Q_WS_X11
static
char
*
x11_display
=
NULL
;
#endif
static
vlc_mutex_t
lock
=
VLC_STATIC_MUTEX
;
/*****************************************************************************
* Module callbacks
...
...
@@ -293,6 +294,12 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
putenv
(
(
char
*
)
"XLIB_SKIP_ARGB_VISUALS=1"
);
#endif
if
(
vlc_mutex_trylock
(
&
lock
))
{
msg_Err
(
p_this
,
"cannot start Qt4 multiple times"
);
return
VLC_EGENERIC
;
}
/* Allocations of p_sys */
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
=
new
intf_sys_t
;
p_intf
->
p_sys
->
b_isDialogProvider
=
isDialogProvider
;
...
...
@@ -305,6 +312,7 @@ static int Open( vlc_object_t *p_this, bool isDialogProvider )
if
(
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
{
delete
p_sys
;
vlc_mutex_unlock
(
&
lock
);
return
VLC_ENOMEM
;
}
...
...
@@ -346,6 +354,7 @@ static void Close( vlc_object_t *p_this )
vlc_join
(
p_sys
->
thread
,
NULL
);
delete
p_sys
;
vlc_mutex_unlock
(
&
lock
);
#ifdef Q_WS_X11
free
(
x11_display
);
#endif
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment