hrev46773 adds 4 changesets to branch 'master' old head: 97e1b053b63ba10e037388a4e21bcb93a3220210 new head: 051d89e19c3d6ceb35d44805be2599ef875ad71c overview: http://cgit.haiku-os.org/haiku/log/?qt=range&q=051d89e+%5E97e1b05 ---------------------------------------------------------------------------- fdc0552: IconSaver: add authors to authors list …already in copyright statements 4a0dcb5: IconSaver: remove extra space 8165696: IconSaver: fix potential memory leak delete icon doesn’t do anything, delete[] data does. 051d89e: IconSaver: bump max icon count to 384 300 wasn’t enough [ John Scipione <jscipione@xxxxxxxxx> ] ---------------------------------------------------------------------------- 9 files changed, 26 insertions(+), 7 deletions(-) src/add-ons/screen_savers/icons/IconsSaver.cpp | 21 ++++++++++++++------- src/apps/pairs/Pairs.cpp | 1 + src/apps/pairs/Pairs.h | 1 + src/apps/pairs/PairsButton.cpp | 1 + src/apps/pairs/PairsButton.h | 1 + src/apps/pairs/PairsView.cpp | 2 ++ src/apps/pairs/PairsView.h | 2 ++ src/apps/pairs/PairsWindow.cpp | 2 ++ src/apps/pairs/PairsWindow.h | 2 ++ ############################################################################ Commit: fdc055299718951a44e0fcd2dce7cda075190eec URL: http://cgit.haiku-os.org/haiku/commit/?id=fdc0552 Author: John Scipione <jscipione@xxxxxxxxx> Date: Mon Jan 27 19:35:15 2014 UTC IconSaver: add authors to authors list …already in copyright statements ---------------------------------------------------------------------------- diff --git a/src/apps/pairs/Pairs.cpp b/src/apps/pairs/Pairs.cpp index 27cb8ce..dd5891b 100644 --- a/src/apps/pairs/Pairs.cpp +++ b/src/apps/pairs/Pairs.cpp @@ -5,6 +5,7 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx */ diff --git a/src/apps/pairs/Pairs.h b/src/apps/pairs/Pairs.h index 222c328..81b5583 100644 --- a/src/apps/pairs/Pairs.h +++ b/src/apps/pairs/Pairs.h @@ -5,6 +5,7 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx */ #ifndef PAIRS_H diff --git a/src/apps/pairs/PairsButton.cpp b/src/apps/pairs/PairsButton.cpp index c020a7a..f202bc1 100644 --- a/src/apps/pairs/PairsButton.cpp +++ b/src/apps/pairs/PairsButton.cpp @@ -5,6 +5,7 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx */ diff --git a/src/apps/pairs/PairsButton.h b/src/apps/pairs/PairsButton.h index eb59a58..8718990 100644 --- a/src/apps/pairs/PairsButton.h +++ b/src/apps/pairs/PairsButton.h @@ -5,6 +5,7 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx */ #ifndef PAIRS_BUTTON_H diff --git a/src/apps/pairs/PairsView.cpp b/src/apps/pairs/PairsView.cpp index 1ac37c9..00ddb24 100644 --- a/src/apps/pairs/PairsView.cpp +++ b/src/apps/pairs/PairsView.cpp @@ -6,7 +6,9 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx + * Adam Smith, adamd.smith@xxxxxxxxxxx */ diff --git a/src/apps/pairs/PairsView.h b/src/apps/pairs/PairsView.h index c374872..ed229f4 100644 --- a/src/apps/pairs/PairsView.h +++ b/src/apps/pairs/PairsView.h @@ -6,7 +6,9 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx + * Adam Smith, adamd.smith@xxxxxxxxxxx */ #ifndef PAIRS_VIEW_H #define PAIRS_VIEW_H diff --git a/src/apps/pairs/PairsWindow.cpp b/src/apps/pairs/PairsWindow.cpp index 3d09164..639d883 100644 --- a/src/apps/pairs/PairsWindow.cpp +++ b/src/apps/pairs/PairsWindow.cpp @@ -6,7 +6,9 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx + * Adam Smith, adamd.smith@xxxxxxxxxxx */ diff --git a/src/apps/pairs/PairsWindow.h b/src/apps/pairs/PairsWindow.h index a063d7c..651c3d7 100644 --- a/src/apps/pairs/PairsWindow.h +++ b/src/apps/pairs/PairsWindow.h @@ -6,7 +6,9 @@ * Distributed under the terms of the MIT License. * * Authors: + * Ralf Schülke, ralf.schuelke@xxxxxxxxxxxxxx * John Scipione, jscipione@xxxxxxxxx + * Adam Smith, adamd.smith@xxxxxxxxxxx */ #ifndef PAIRS_WINDOW_H #define PAIRS_WINDOW_H ############################################################################ Commit: 4a0dcb5bfae79977f0c925f173bb4e3a11f12a6b URL: http://cgit.haiku-os.org/haiku/commit/?id=4a0dcb5 Author: John Scipione <jscipione@xxxxxxxxx> Date: Mon Jan 27 20:11:59 2014 UTC IconSaver: remove extra space ---------------------------------------------------------------------------- diff --git a/src/add-ons/screen_savers/icons/IconsSaver.cpp b/src/add-ons/screen_savers/icons/IconsSaver.cpp index 87cb7f0..2e1cebc 100644 --- a/src/add-ons/screen_savers/icons/IconsSaver.cpp +++ b/src/add-ons/screen_savers/icons/IconsSaver.cpp @@ -18,7 +18,6 @@ #include <Catalog.h> #include <MimeType.h> - #include <BuildScreenSaverDefaultSettingsView.h> #include "IconDisplay.h" ############################################################################ Commit: 8165696e0217ddad7438ea9341badaae2ca28158 URL: http://cgit.haiku-os.org/haiku/commit/?id=8165696 Author: John Scipione <jscipione@xxxxxxxxx> Date: Mon Jan 27 20:12:42 2014 UTC IconSaver: fix potential memory leak delete icon doesn’t do anything, delete[] data does. ---------------------------------------------------------------------------- diff --git a/src/add-ons/screen_savers/icons/IconsSaver.cpp b/src/add-ons/screen_savers/icons/IconsSaver.cpp index 2e1cebc..e52dc41 100644 --- a/src/add-ons/screen_savers/icons/IconsSaver.cpp +++ b/src/add-ons/screen_savers/icons/IconsSaver.cpp @@ -197,16 +197,24 @@ IconsSaver::_GetVectorIcons() if (mimeType.InitCheck() != B_OK) continue; - vector_icon* icon = (vector_icon*)malloc(sizeof(vector_icon)); - if (icon == NULL) + uint8* data; + size_t size; + + if (mimeType.GetIcon(&data, &size) != B_OK) { + // didn't find an icon continue; + } - if (mimeType.GetIcon(&icon->data, &icon->size) != B_OK) { - // didn't find an icon, delete the icon container - delete icon; + vector_icon* icon = (vector_icon*)malloc(sizeof(vector_icon)); + if (icon == NULL) { + // ran out of memory, delete the icon data + delete[] data; continue; } + icon->data = data; + icon->size = size; + // found a vector icon, add it to the list fVectorIcons.AddItem(icon); if (fVectorIcons.CountItems() >= kMaxIconCount) { ############################################################################ Revision: hrev46773 Commit: 051d89e19c3d6ceb35d44805be2599ef875ad71c URL: http://cgit.haiku-os.org/haiku/commit/?id=051d89e Author: John Scipione <jscipione@xxxxxxxxx> Date: Mon Jan 27 20:13:28 2014 UTC IconSaver: bump max icon count to 384 300 wasn’t enough ---------------------------------------------------------------------------- diff --git a/src/add-ons/screen_savers/icons/IconsSaver.cpp b/src/add-ons/screen_savers/icons/IconsSaver.cpp index e52dc41..1ca0694 100644 --- a/src/add-ons/screen_savers/icons/IconsSaver.cpp +++ b/src/add-ons/screen_savers/icons/IconsSaver.cpp @@ -37,7 +37,7 @@ static const int32 kMinIconWidthPercentage = 5; static const int32 kMaxIconWidthPercentage = 20; // same here static const int32 kMinIconCount = 20; -static const int32 kMaxIconCount = 300; +static const int32 kMaxIconCount = 384; const rgb_color kBackgroundColor = ui_color(B_DESKTOP_COLOR);