mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-30 00:41:09 +02:00
src/driver/pictureviewer/pictureviewer.cpp: move free handlers to ~CPictureViewer(), fix segfault aufter commit d9aaafa0f1
Origin commit data ------------------ Commit:725b3eb27c
Author: Jacek Jendrzej <overx300@gmail.com> Date: 2013-04-24 (Wed, 24 Apr 2013) Origin message was: ------------------ src/driver/pictureviewer/pictureviewer.cpp: move free handlers to ~CPictureViewer(), fix segfault aufter commitd9aaafa0f1
This commit is contained in:
@@ -368,6 +368,17 @@ CPictureViewer::CPictureViewer ()
|
|||||||
init_handlers ();
|
init_handlers ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CPictureViewer::~CPictureViewer ()
|
||||||
|
{
|
||||||
|
Cleanup();
|
||||||
|
CFormathandler *fh = fh_root;
|
||||||
|
while (fh) {
|
||||||
|
CFormathandler *tmp = fh->next;
|
||||||
|
free(fh);
|
||||||
|
fh = tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b)
|
void CPictureViewer::showBusy (int sx, int sy, int width, char r, char g, char b)
|
||||||
{
|
{
|
||||||
// dbout("Show Busy{\n");
|
// dbout("Show Busy{\n");
|
||||||
@@ -446,12 +457,6 @@ void CPictureViewer::Cleanup ()
|
|||||||
free (m_CurrentPic_Buffer);
|
free (m_CurrentPic_Buffer);
|
||||||
m_CurrentPic_Buffer = NULL;
|
m_CurrentPic_Buffer = NULL;
|
||||||
}
|
}
|
||||||
CFormathandler *fh = fh_root;
|
|
||||||
while (fh) {
|
|
||||||
CFormathandler *tmp = fh->next;
|
|
||||||
free(fh);
|
|
||||||
fh = tmp;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CPictureViewer::getSize(const char* name, int* width, int *height)
|
void CPictureViewer::getSize(const char* name, int* width, int *height)
|
||||||
|
@@ -50,7 +50,7 @@ class CPictureViewer
|
|||||||
COLOR=2
|
COLOR=2
|
||||||
};
|
};
|
||||||
CPictureViewer();
|
CPictureViewer();
|
||||||
~CPictureViewer(){Cleanup();};
|
~CPictureViewer();
|
||||||
bool ShowImage(const std::string & filename, bool unscaled=false);
|
bool ShowImage(const std::string & filename, bool unscaled=false);
|
||||||
bool DecodeImage(const std::string & name, bool showBusySign=false, bool unscaled=false);
|
bool DecodeImage(const std::string & name, bool showBusySign=false, bool unscaled=false);
|
||||||
bool DisplayNextImage();
|
bool DisplayNextImage();
|
||||||
|
Reference in New Issue
Block a user