Fix color chooser crash

This commit is contained in:
Garhoogin 2025-05-02 20:11:02 -05:00 committed by GitHub
parent 36bb5deee2
commit 36d8782cc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -1719,7 +1719,7 @@ static void NftrViewerOnLButtonDown(NFTRVIEWERDATA *data) {
cc.hInstance = NULL;
cc.hwndOwner = hWndMain;
cc.rgbResult = ColorConvertFromDS(orig);
cc.lpCustColors = NULL;
cc.lpCustColors = data->dlgCustomColors;
cc.Flags = 0x103;
BOOL (WINAPI *ChooseColorFunction) (CHOOSECOLORW *) = ChooseColorW;
if (GetMenuState(GetMenu(hWndMain), ID_VIEW_USE15BPPCOLORCHOOSER, MF_BYCOMMAND)) ChooseColorFunction = CustomChooseColor;

View File

@ -27,6 +27,7 @@ typedef struct NFTRVIEWERDATA_ {
int spaceX; // text preview space X
int spaceY; // text preview space Y
COLOR palette[16]; // color palette to render with
COLORREF dlgCustomColors[16];
HWND hWndMargin;
HWND hWndPreview;