Commit da9f2a03 authored by Robert Sprowson's avatar Robert Sprowson
Browse files

Check for NULL pointers before finding the syshandle

menu.c: if NULL return -1, this has the added advantage that a menu maker (see event_attachmenumaker) can return NULL to mean "no menu thanks" and not data abort in event.c
dbox.c: if NULL return 0, this is somewhat consistent with template_syshandle()
menu.h: typo in comment corrected

Version 5.82. Tagged as 'RISC_OSLib-5_82'
parent 83945ac3
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "5.81"
Module_Version SETA 581
Module_MajorVersion SETS "5.82"
Module_Version SETA 582
Module_MinorVersion SETS ""
Module_Date SETS "25 Mar 2014"
Module_ApplicationDate SETS "25-Mar-14"
Module_Date SETS "08 May 2014"
Module_ApplicationDate SETS "08-May-14"
Module_ComponentName SETS "RISC_OSLib"
Module_ComponentPath SETS "castle/RiscOS/Sources/Lib/RISC_OSLib"
Module_FullVersion SETS "5.81"
Module_HelpVersion SETS "5.81 (25 Mar 2014)"
Module_FullVersion SETS "5.82"
Module_HelpVersion SETS "5.82 (08 May 2014)"
END
/* (5.81)
/* (5.82)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 5.81
#define Module_MajorVersion_CMHG 5.82
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 25 Mar 2014
#define Module_Date_CMHG 08 May 2014
#define Module_MajorVersion "5.81"
#define Module_Version 581
#define Module_MajorVersion "5.82"
#define Module_Version 582
#define Module_MinorVersion ""
#define Module_Date "25 Mar 2014"
#define Module_Date "08 May 2014"
#define Module_ApplicationDate "25-Mar-14"
#define Module_ApplicationDate "08-May-14"
#define Module_ComponentName "RISC_OSLib"
#define Module_ComponentPath "castle/RiscOS/Sources/Lib/RISC_OSLib"
#define Module_FullVersion "5.81"
#define Module_HelpVersion "5.81 (25 Mar 2014)"
#define Module_LibraryVersionInfo "5:81"
#define Module_FullVersion "5.82"
#define Module_HelpVersion "5.82 (08 May 2014)"
#define Module_LibraryVersionInfo "5:82"
......@@ -1023,7 +1023,9 @@ BOOL dbox_persist(void) {
int dbox_syshandle(dbox d)
{
return(d->w);
if (d != NULL)
return d->w;
return (int)NULL;
}
/* -------- Initialisation. -------- */
......
......@@ -528,7 +528,9 @@ void menu_submenu(menu m, int place, menu submenu)
void *menu_syshandle(menu m)
{
return (void *) m->m;
if (m != NULL)
return (void *)m->m;
return (void *)-1;
}
/* end */
......@@ -34,7 +34,7 @@ typedef struct menu__str *menu; /* abstract menu handle */
/*
* A menu description string defines a sequence of entries, with the
* following syntax (curly brakets mean 0 or more, square brackets mean
* following syntax (curly brackets mean 0 or more, square brackets mean
* 0 or 1):
* opt ::= "!" or "~" or ">" or " "
* sep ::= "," or "|"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment