diff options
| author | Rusty Wagner <rusty@vector35.com> | 2019-05-24 20:08:25 -0400 |
|---|---|---|
| committer | Rusty Wagner <rusty@vector35.com> | 2019-05-24 20:08:25 -0400 |
| commit | fd47bbe9e3cf567ae355570620bd9b0e26c62120 (patch) | |
| tree | c93f536e4890348108fb1ebfcbc816bbbc3a3747 /examples/triage/entropy.h | |
| parent | f229958f0eadd39a37681aa12ffb2ac9d6df60d7 (diff) | |
Limit size of entropy image to fix crash
Diffstat (limited to 'examples/triage/entropy.h')
| -rw-r--r-- | examples/triage/entropy.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/triage/entropy.h b/examples/triage/entropy.h index abe591b4..eb75cfee 100644 --- a/examples/triage/entropy.h +++ b/examples/triage/entropy.h @@ -9,20 +9,18 @@ class EntropyThread { BinaryViewRef m_data; - QImage m_image; + QImage* m_image; size_t m_blockSize; bool m_updated, m_running; std::thread m_thread; public: - EntropyThread(BinaryViewRef data, int width, size_t blockSize); + EntropyThread(BinaryViewRef data, size_t blockSize, QImage* image); ~EntropyThread(); void Run(); bool IsUpdated() { return m_updated; } void ResetUpdated() { m_updated = false; } - - const QImage& GetImage() { return m_image; } }; @@ -34,6 +32,7 @@ class EntropyWidget: public QWidget BinaryViewRef m_data, m_rawData; size_t m_blockSize; int m_width; + QImage m_image; EntropyThread* m_thread; public: |
