Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
386742db
Commit
386742db
authored
Aug 15, 2006
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* skins2/controls/ctrl_image.cpp: Avoid a crash when resizing a Image control
to a very small size, in scaling mode
parent
e0a50df3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
modules/gui/skins2/controls/ctrl_image.cpp
modules/gui/skins2/controls/ctrl_image.cpp
+12
-9
No files found.
modules/gui/skins2/controls/ctrl_image.cpp
View file @
386742db
...
...
@@ -100,17 +100,20 @@ void CtrlImage::draw( OSGraphics &rImage, int xDest, int yDest )
if
(
m_resizeMethod
==
kScale
)
{
// Use scaling method
if
(
width
!=
m_pImage
->
getWidth
()
||
height
!=
m_pImage
->
getHeight
()
)
if
(
width
>
1
&&
height
>
1
)
{
OSFactory
*
pOsFactory
=
OSFactory
::
instance
(
getIntf
()
);
// Rescale the image with the actual size of the control
ScaledBitmap
bmp
(
getIntf
(),
m_rBitmap
,
width
,
height
);
SKINS_DELETE
(
m_pImage
);
m_pImage
=
pOsFactory
->
createOSGraphics
(
width
,
height
);
m_pImage
->
drawBitmap
(
bmp
,
0
,
0
);
if
(
width
!=
m_pImage
->
getWidth
()
||
height
!=
m_pImage
->
getHeight
()
)
{
OSFactory
*
pOsFactory
=
OSFactory
::
instance
(
getIntf
()
);
// Rescale the image with the actual size of the control
ScaledBitmap
bmp
(
getIntf
(),
m_rBitmap
,
width
,
height
);
SKINS_DELETE
(
m_pImage
);
m_pImage
=
pOsFactory
->
createOSGraphics
(
width
,
height
);
m_pImage
->
drawBitmap
(
bmp
,
0
,
0
);
}
rImage
.
drawGraphics
(
*
m_pImage
,
0
,
0
,
xDest
,
yDest
);
}
rImage
.
drawGraphics
(
*
m_pImage
,
0
,
0
,
xDest
,
yDest
);
}
else
{
...
...
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