https://git.reactos.org/?p=reactos.git;a=commitdiff;h=639739a7cd915a3f63976a4b2c356b54a5005985

commit 639739a7cd915a3f63976a4b2c356b54a5005985
Author:     Katayama Hirofumi MZ <[email protected]>
AuthorDate: Sun Apr 9 09:01:14 2023 +0900
Commit:     Katayama Hirofumi MZ <[email protected]>
CommitDate: Sun Apr 9 09:01:14 2023 +0900

    [MSPAINT] Fix SelectionModel::InsertFromHBITMAP bug
    
    CORE-18867, CORE-18920
---
 base/applications/mspaint/selectionmodel.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/base/applications/mspaint/selectionmodel.cpp 
b/base/applications/mspaint/selectionmodel.cpp
index 3609632f63b..59aaa382ac9 100644
--- a/base/applications/mspaint/selectionmodel.cpp
+++ b/base/applications/mspaint/selectionmodel.cpp
@@ -199,8 +199,8 @@ void SelectionModel::Landing()
 
 void SelectionModel::InsertFromHBITMAP(HBITMAP hBm, INT x, INT y)
 {
-    m_hbmColor = CopyDIBImage(hBm);
     ::DeleteObject(m_hbmColor);
+    m_hbmColor = CopyDIBImage(hBm);
 
     m_rc.left = x;
     m_rc.top = y;

Reply via email to