WIP: clean error for alloc problems
This commit is contained in:
parent
4e291bc179
commit
0a7c9d28d3
|
@ -227,7 +227,9 @@ void on_realize(GtkWidget *widget)
|
|||
if(gtk_gl_area_get_error(GTK_GL_AREA(widget)) != NULL)
|
||||
return;
|
||||
|
||||
graphics_init((void*)&widget);
|
||||
if (graphics_init((void*)&widget) == false) {
|
||||
ui_send_internal_notification("Failed to allocate GLArea !");
|
||||
}
|
||||
}
|
||||
|
||||
/* We should tear down the state when unrealizing */
|
||||
|
@ -238,7 +240,9 @@ void on_unrealize(GtkWidget *widget)
|
|||
if(gtk_gl_area_get_error(GTK_GL_AREA(widget)) != NULL)
|
||||
return;
|
||||
|
||||
graphics_shutdown((void*)&widget);
|
||||
if (graphics_shutdown((void*)&widget)) {
|
||||
ui_send_internal_notification("Failed to allocate GLArea !");
|
||||
}
|
||||
}
|
||||
|
||||
void on_close_window(GtkWidget *widget)
|
||||
|
|
Loading…
Reference in New Issue