* Fix a few spots where we were checking for NULL unneededly
* Fix a few spots where we *should* of been checking for NULL to prevent referencing a null pointer. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42505 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
13e2521356
commit
a956672a33
@ -168,6 +168,7 @@ init_common(int device, bool isClone)
|
||||
static void
|
||||
uninit_common(void)
|
||||
{
|
||||
if (gInfo != NULL) {
|
||||
delete_area(gInfo->regs_area);
|
||||
delete_area(gInfo->shared_info_area);
|
||||
|
||||
@ -178,14 +179,15 @@ uninit_common(void)
|
||||
close(gInfo->device);
|
||||
|
||||
free(gInfo);
|
||||
}
|
||||
|
||||
for (uint32 id = 0; id < MAX_DISPLAY; id++) {
|
||||
if (gDisplay[id]->regs != NULL)
|
||||
if (gDisplay[id] != NULL) {
|
||||
free(gDisplay[id]->regs);
|
||||
if (gDisplay[id] != NULL)
|
||||
free(gDisplay[id]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// #pragma mark - public accelerant functions
|
||||
|
Loading…
Reference in New Issue
Block a user