summaryrefslogtreecommitdiffstats
path: root/Panel.c
diff options
context:
space:
mode:
authorHisham <hisham@gobolinux.org>2016-02-02 15:53:02 +0100
committerHisham <hisham@gobolinux.org>2016-02-02 15:53:02 +0100
commitb54d2dde407921caa7561dde6b45831ba93d0840 (patch)
treecd81eea35dd65e46d22f2801ea403e1efc06eb59 /Panel.c
parenta1f7f2869ec2bd860d5b4e4b39736ca877afdf6f (diff)
Check for failure in allocations.
Diffstat (limited to 'Panel.c')
-rw-r--r--Panel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Panel.c b/Panel.c
index 16abc248..dd94ceae 100644
--- a/Panel.c
+++ b/Panel.c
@@ -97,7 +97,7 @@ PanelClass Panel_class = {
Panel* Panel_new(int x, int y, int w, int h, bool owner, ObjectClass* type, FunctionBar* fuBar) {
Panel* this;
- this = malloc(sizeof(Panel));
+ this = xMalloc(sizeof(Panel));
Object_setClass(this, Class(Panel));
Panel_init(this, x, y, w, h, type, owner, fuBar);
return this;
@@ -455,7 +455,7 @@ bool Panel_onKey(Panel* this, int key) {
HandlerResult Panel_selectByTyping(Panel* this, int ch) {
int size = Panel_size(this);
if (!this->eventHandlerState)
- this->eventHandlerState = calloc(100, sizeof(char));
+ this->eventHandlerState = xCalloc(100, sizeof(char));
char* buffer = this->eventHandlerState;
if (ch < 255 && isalnum(ch)) {

© 2014-2024 Faster IT GmbH | imprint | privacy policy