Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
65213a05
Commit
65213a05
authored
Apr 06, 2004
by
Cyril Deguet
Browse files
* 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
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