diff options
Diffstat (limited to 'src/Object.c')
-rw-r--r-- | src/Object.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/Object.c b/src/Object.c index 178bcb5..f5cfb91 100644 --- a/src/Object.c +++ b/src/Object.c @@ -166,10 +166,13 @@ ConstructCallbackOffsets(WidgetClass myWidgetClass) /* Count the number of callbacks */ resourceList = (XrmResourceList) myObjectClass->object_class.resources; - for (i = (int) myObjectClass->object_class.num_resources; --i >= 0; - resourceList++) - if (resourceList->xrm_type == QCallback) - tableSize++; + if (resourceList != NULL) { + for (i = (int) myObjectClass->object_class.num_resources; --i >= 0; + resourceList++) { + if (resourceList->xrm_type == QCallback) + tableSize++; + } + } /* * Allocate and load the table. Make sure that the new callback |