summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/osdcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/osd/osdcore.c')
-rw-r--r--src/osd/osdcore.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/osd/osdcore.c b/src/osd/osdcore.c
index 41214b3c852..5079f8be2d6 100644
--- a/src/osd/osdcore.c
+++ b/src/osd/osdcore.c
@@ -53,8 +53,10 @@ static output_delegate output_cb[OSD_OUTPUT_CHANNEL_COUNT] =
output_delegate osd_set_output_channel(output_channel channel, output_delegate callback)
{
- assert(channel < OSD_OUTPUT_CHANNEL_COUNT);
- assert(!callback.isnull());
+ if (!(channel < OSD_OUTPUT_CHANNEL_COUNT) || callback.isnull())
+ {
+ throw std::exception();
+ }
/* return the originals if requested */
output_delegate prevcb = output_cb[channel];