diff options
author | Adam Tkac <atkac@redhat.com> | 2010-03-04 15:24:20 +0000 |
---|---|---|
committer | Adam Tkac <atkac@redhat.com> | 2010-03-04 15:24:20 +0000 |
commit | 9322a44e08753a85d97fcd952677b1353926ead0 (patch) | |
tree | d7d91e1464fd650e5087117c8754a8cf7c1c472b /unix | |
parent | 24537410bf99c3b5ce94d05c19cdb87eede0208c (diff) | |
download | tigervnc-9322a44e08753a85d97fcd952677b1353926ead0.tar.gz tigervnc-9322a44e08753a85d97fcd952677b1353926ead0.zip |
[Bugfix] Don't crash in TXImage::updateColourMap function due NULL pointer
dereference. Thanks to Jan Gorig for the patch.
Main problem is that DesktopWindow::setColourMapEntries starts timer and after
it expires it calls im->updateColourMap. During timer period format might be
changed to full color thus "tig" pointer dereferenced in updateColourMap()
becomes invalid.
git-svn-id: svn://svn.code.sf.net/p/tigervnc/code/trunk@4003 3789f03b-4d11-0410-bbf8-ca57d06f2519
Diffstat (limited to 'unix')
-rw-r--r-- | unix/tx/TXImage.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/unix/tx/TXImage.cxx b/unix/tx/TXImage.cxx index 0a50791a..3e1a98e2 100644 --- a/unix/tx/TXImage.cxx +++ b/unix/tx/TXImage.cxx @@ -164,7 +164,8 @@ void TXImage::setColourMapEntries(int firstColour, int nColours, rdr::U16* rgbs) void TXImage::updateColourMap() { - tig->setColourMapEntries(0, 0, 0); + if (tig != 0) + tig->setColourMapEntries(0, 0, 0); } void TXImage::lookup(int index, int* r, int* g, int* b) |