Skip to content
This repository was archived by the owner on Aug 31, 2021. It is now read-only.

Commit 18d82a0

Browse files
author
livecodeali
committed
[[ Bug 17399 ]] Prevent crash when fetching colorDialogColors
1 parent e3bb506 commit 18d82a0

File tree

3 files changed

+3
-1
lines changed

3 files changed

+3
-1
lines changed

docs/notes/bugfix-17399.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Prevent crash on fetching colorDialogColors

engine/src/desktop-ans.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ bool MCA_color(MCStringRef p_title, MCColor p_initial, bool as_sheet, bool& r_ch
321321
// MERG-2013-08-18: Stubs for colorDialogColors. Possibly implement when color dialog moves to Cocoa
322322
void MCA_getcolordialogcolors(MCColor*& r_list, uindex_t& r_count)
323323
{
324-
324+
r_count = 0;
325325
}
326326

327327
void MCA_setcolordialogcolors(MCColor* p_list, uindex_t p_count)

engine/src/srvspec.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,7 @@ void MCA_setcolordialogcolors(MCColor* p_list, uindex_t p_count)
783783

784784
void MCA_getcolordialogcolors(MCColor*& r_colors, uindex_t& r_count)
785785
{
786+
r_count = 0;
786787
}
787788

788789

0 commit comments

Comments
 (0)