Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
12
Merge Requests
12
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
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
Steve Lhomme
VLC
Commits
65213a05
Commit
65213a05
authored
Apr 06, 2004
by
Cyril Deguet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* x11_graphics: check if the width and height are not null, to avoid
a X11 Bad Value error
parent
b442a2d0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
modules/gui/skins2/x11/x11_graphics.cpp
modules/gui/skins2/x11/x11_graphics.cpp
+8
-0
No files found.
modules/gui/skins2/x11/x11_graphics.cpp
View file @
65213a05
...
...
@@ -44,6 +44,14 @@ X11Graphics::X11Graphics( intf_thread_t *pIntf, X11Display &rDisplay,
int
screen
=
DefaultScreen
(
XDISPLAY
);
int
depth
=
DefaultDepth
(
XDISPLAY
,
screen
);
// X11 doesn't accept that !
if
(
width
==
0
||
height
==
0
)
{
// Avoid a X11 Bad Value error
width
=
height
=
1
;
msg_Err
(
getIntf
(),
"Invalid image size (null width or height)"
);
}
// Create a pixmap
m_pixmap
=
XCreatePixmap
(
XDISPLAY
,
DefaultRootWindow
(
XDISPLAY
),
width
,
height
,
depth
);
...
...
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